Beispiel #1
0
        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);
        }
Beispiel #2
0
 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}");
 }
Beispiel #3
0
 public void Print()
 {
     Console.WriteLine($"{Id,-10}|{Name,-15}|{Surname,-15}|{DateofBirth.ToString("d/M/yyyy"),-15}|{TuitionFees}");
 }