public string GetAge() { int now = int.Parse(DateTime.Now.ToString("yyyyMMdd")); int dob = int.Parse(DateofBirth.ToString("yyyyMMdd")); int age = (now - dob) / 10000; string returnstring = "The age of " + FirstName + " " + MiddleName + " " + LastName + " is " + age + "."; return(returnstring); }
public void Print() { Console.WriteLine($"{Id,-10}|{Name,-15}|{Surname,-15}|{DateofBirth.ToString("d/M/yyyy"),-15}|{DateofHire.ToString("d/M/yyyy"),-15}|{Discipline,-15}|{Salary}"); }
public void Print() { Console.WriteLine($"{Id,-10}|{Name,-15}|{Surname,-15}|{DateofBirth.ToString("d/M/yyyy"),-15}|{TuitionFees}"); }