public bool TryAddUser(string user, out string error) { error = ""; if (string.IsNullOrEmpty(user)) { error = "Supplied username was empty"; return(false); } VoteUser usr = new VoteUser { Username = user }; if (!_users.ContainsKey(usr)) { _users.Add(usr, DateTime.Now); } return(true); }
public VoteUser(VoteUser other) : this() { Username = other.Username; }