Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Student s = new Student();
            s.FirstName = "Fred";
            s.LastName = "jiang";
            s.Birthdate = "830504";
            s.AddressLine1 = "T";
            s.AddressLine2 = "S";
            s.City = "Kaohsiung";
            s.Country = "Taiwan";

            Console.WriteLine("First Name = " + s.FirstName);
            Console.WriteLine("Last Name = " + s.LastName);
            Console.WriteLine("Birthdate = " + s.Birthdate);
            Console.WriteLine("AddressLine1 = " + s.AddressLine1);
            Console.WriteLine("AddressLine2 = " + s.AddressLine2);
            Console.WriteLine("City = " + s.City);
            Console.WriteLine("Country = " + s.Country);
            Console.ReadLine();
        }
Exemplo n.º 2
0
 private static void OutputStudents(Student Student)
 {
     Console.WriteLine("-----------------+----------------------+------------+------------+-----");
     Console.WriteLine($"      {Student.FirstName,-10} |      {Student.LastName,-15} | {Student.DateOfBirth.ToString("d/M/yyyy"),-10} | {Student._tuitionFees,-10} | {Student.ID,-10}");
     Console.WriteLine("-----------------+----------------------+------------+------------+-----");
 }