//------------------------------------------------------------- public override void UpdateLike(DTO_Like like) //------------------------------------------------------------- { if (!Likes.Contains(like.address)) { Likes.Add(like.address); label_likes.Text = Likes.Count.ToString("D2"); } }
/// <summary> /// Removes a user from the list of users that like an idea. /// </summary> /// <param name="user">The user to remove from the like list. /// If not in the list nothing happens.</param> public void UnlikeIdea(User user) { if (user == null) { throw new ArgumentNullException("user can not be null."); } if (Likes.Contains(user)) { Likes.Remove(user); } }