public override bool Equals(System.Object otherPost) { if (!(otherPost is Post)) { return(false); } else { Post newPost = (Post)otherPost; bool idEquality = this.GetId() == newPost.GetId(); bool titleEquality = this.GetTitle() == newPost.GetTitle(); bool contentEquality = this.GetContent() == newPost.GetContent(); bool blogIdEquality = this.GetBlogId() == newPost.GetBlogId(); return(idEquality && titleEquality && contentEquality && blogIdEquality); } }