예제 #1
0
파일: Form1.cs 프로젝트: Melos89/WCFLabs
        private void button1_Click(object sender, EventArgs e)
        {
            var proxy = new AgeCheckerClient();

            AgeInDaysLabel.Text  = proxy.AgeInDays(DateTime.Parse(DateBox.Text)).ToString();
            AgeInHoursLabel.Text = proxy.AgeInHours(DateTime.Parse(DateBox.Text)).ToString();
            AgeInYearsLabel.Text = proxy.AgeInYears(DateTime.Parse(DateBox.Text)).ToString();
        }
예제 #2
0
파일: Form1.cs 프로젝트: Melos89/WCFLabs
        private void button1_Click(object sender, EventArgs e)
        {
            var proxy = new AgeCheckerClient();

            AgeInDaysLabel.Text = proxy.AgeInDays(DateTime.Parse(DateBox.Text)).ToString();
            AgeInHoursLabel.Text = proxy.AgeInHours(DateTime.Parse(DateBox.Text)).ToString();
            AgeInYearsLabel.Text = proxy.AgeInYears(DateTime.Parse(DateBox.Text)).ToString();
        }
예제 #3
0
파일: Program.cs 프로젝트: Melos89/WCFLabs
        static void Main(string[] args)
        {
            Console.WriteLine("Provide your date of birth in a yyyy/mm/dd format:");

            var result = Console.ReadLine();
            var proxy  = new AgeCheckerClient();

            var ageInDays  = proxy.AgeInDays(DateTime.Parse(result));
            var ageInHours = proxy.AgeInHours(DateTime.Parse(result));
            var age        = proxy.AgeInYears(DateTime.Parse(result));


            Console.WriteLine($"Your age in days: {ageInDays}");
            Console.WriteLine($"Your age in Hours: {ageInHours}");
            Console.WriteLine($"Your age this year: {age}");

            Console.ReadKey();
        }
예제 #4
0
파일: Program.cs 프로젝트: Melos89/WCFLabs
        static void Main(string[] args)
        {
            Console.WriteLine("Provide your date of birth in a yyyy/mm/dd format:");

            var result = Console.ReadLine();
            var proxy = new AgeCheckerClient();

            var ageInDays = proxy.AgeInDays(DateTime.Parse(result));
            var ageInHours = proxy.AgeInHours(DateTime.Parse(result));
            var age = proxy.AgeInYears(DateTime.Parse(result));


            Console.WriteLine($"Your age in days: {ageInDays}");
            Console.WriteLine($"Your age in Hours: {ageInHours}");
            Console.WriteLine($"Your age this year: {age}");

            Console.ReadKey();
        }