/*ToString Method*/
        public override string ToString()
        {
            string result = string.Format("{0}", Club != null ? Club.Name : "not assigned");

            return(string.Format($"Name: {Name} \nAdress: {Address.ToString()} \nPhone: {Club.FormatPhoneNo(PhoneNumber)}" +
                                 $" \nDateOfBirth: {DateOfBirth} \nReg number: {UniqueId} \nClub: {result}"));
        }
示例#2
0
 /*Add Method to add club*/
 public void Add(Club newClub)
 {
     Clubs.Add(newClub);
     Number++;
 }