public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Job != 0) { hash ^= Job.GetHashCode(); } if (Age != 0) { hash ^= Age.GetHashCode(); } if (Gender.Length != 0) { hash ^= Gender.GetHashCode(); } return(hash); }
public override string ToString() { return ($"[{Id}] {Name ?? "---"} {(DateOfBirth != null ? DateOfBirth.ToString() : "---")} {Age.ToString() ?? "---"} " + $"[{string.Join(",", Awards.ConvertAll(a => $"{a.Id} {a.Title}"))}]"); }
public virtual void setAge(Age age) { this.age = age; }
/// <summary> /// Override of ToString in order to get information needed. /// </summary> /// <returns>string</returns> public override string ToString() { return(Id.ToString() + NickName.ToString() + Age.ToString() + Role.ToString() + TeamId.ToString()); }