Beispiel #1
0
        static void Main2(string[] args)
        {
            Person p1 = new Person("Alice", new DateTime(1980, 1, 1), true);

            p1.Name = "Alice Smith";
            p1.Show();
            Console.WriteLine("{0} age is more or less {1} ", p1.Name, p1.Age);


            Person p2 = new Person("Bob the Builder", new DateTime(1992, 5, 12));

            p2.Show();
            Console.WriteLine("{0} age is more or less {1} ", p2.Name, p2.Age);

            Console.WriteLine("O total de pessoas é: {0}", Person.GetNumberOfPersons());

            //Person p1 = new Person();

            //p1.name = "Alice";
            //p1.id = 123;
            //p1.birthDate = new DateTime(1980, 1, 1);
            //p1.Show();

            //Person p2 = new Person();

            //p2.name = "Bob the Builder";
            //p2.id = 456;
            //p2.birthDate = new DateTime(1992,5,12);
            //p2.Show();
        }