public User GetUserByName(string name) { if (!Name2UserID.ContainsKey(name)) { return(null); } else { return(GetUser(Name2UserID[name])); } }
public void AddUser(int id, string password, string name, string nick_name) { UserList.Add(id, new User(id, password, name, nick_name)); Name2UserID.Add(name, id); }