/* 02. Create a console-based client for the WCF service above. * Use the "Add Service Reference" in Visual Studio.*/ /// <summary> /// Mains this instance. /// </summary> static void Main() { ServiceDayOfWeekClient client = new ServiceDayOfWeekClient(); var dayInBg = client.GetDayOfWeek(DateTime.Now); Console.WriteLine("Днес е: {0}.", dayInBg); }
static void Main() { ServiceDayOfWeekClient client = new ServiceDayOfWeekClient(); using (client) { Console.WriteLine("Today is:"); Console.WriteLine(client.GetDayOfWeek(DateTime.Now)); Console.WriteLine("Enter date in format dd.MM.yyyy"); DateTime date = DateTime.ParseExact(Console.ReadLine(), "dd.MM.yyyy", new CultureInfo("bg-BG")); Console.WriteLine(client.GetDayOfWeek(date)); } }