예제 #1
0
        public static void Main(string[] args)
        {
            var person = new Person();

            person.SetBirthDate(new DateTime(1979, 8, 29));
            Console.WriteLine(person.GetBirthDate());
        }
예제 #2
0
        static void Main(string[] args)
        {
            var person = new  Person();

            person.SetBirthDate(new DateTime(1989, 5, 28));
            Console.WriteLine(person.GetBirthDate());
            Console.ReadKey();
        }
예제 #3
0
        static void Main(string[] args)
        {
            var person = new Person();

            person.SetBirtDate(new DateTime(1982, 1, 1));

            Console.WriteLine("BD=" + person.GetBirthDate());
        }
예제 #4
0
        static void Main(string[] args)
        {
            var person = new Person();

            //cant see person.birthday with person.birth...
            //use set / get

            person.SetBirthDate(new DateTime(1982, 9, 9));
            var birthDate = person.GetBirthDate();

            Console.WriteLine(birthDate);
        }
        static void Main(string[] args)
        {
            var person = new Person();

            person.SetBirthDate(new DateTime(1982, 1, 1));
            Console.WriteLine(person.GetBirthDate());

            // Why use private when we needed to create two functions
            // in order to get/set the birthdate?
            // Answer: This is a stupid example, but some things are implementation
            // details, and should be hidden from the outside world.
        }
예제 #6
0
        static void Main(string[] args)
        {
            //var john = new Customer();
            //john.setName("john");
            //Console.WriteLine(john.getName());

            var person = new Person();

            person.SetBirthdate(new DateTime(1982, 1, 1));
            Console.WriteLine(person.GetBirthDate());

            Console.Read();
        }