示例#1
0
        static void Main(string[] args)
        {
            Contact gosia = new Contact
            {
                FirstName  = "Gosia",
                AgeInYears = 49
            };

            ContactConsoleWriter gosiaWriter = new ContactConsoleWriter(gosia);

            gosiaWriter.Write();
        }
示例#2
0
        private static void Main()
        {
            var sarah = new Contact
            {
                FirstName = "Sarah", AgeInYears = 42
            };
            var sarahWriter = new ContactConsoleWriter(sarah);

            sarahWriter.Write();
            WriteLine("\n\n Hit enter to exit...");
            ReadLine();
        }
示例#3
0
        static void Main(string[] args)
        {
            Contact Cody = new Contact
            {
                FirstName  = "Cody",
                AgeInYears = 20
            };

            var CodyWriter = new ContactConsoleWriter(Cody);

            CodyWriter.Write();
        }
示例#4
0
        static void Main(string[] args)
        {
            WriteLine("Starting");
            Contact sarah = new Contact {
                FirstName = "Sarah", AgeInYears = 42
            };
            ContactConsoleWriter sarahWriter = new ContactConsoleWriter(sarah);

            sarahWriter.Write();

            WriteLine("\n\n Hit enter to exit....");
            ReadLine();
        }