예제 #1
0
        private static void Main(string[] args)
        {
            Console.WriteLine("Enter First Name:");
            string firstname = Console.ReadLine();

            Console.WriteLine("Enter Last Name:");
            string lastName = Console.ReadLine();

            HelloWorldClient client = new HelloWorldClient("NetTcpBinding_IHelloWorld");
            Name myName = new Name() { FirstName = firstname, LastName = lastName };
            Console.WriteLine("Sending Service Request ...");
            Console.WriteLine(client.SayHelloAsync(myName).Result);
            client.Close();
            Console.ReadLine();
        }
예제 #2
0
 public string SayHello(Name person)
 {
     return string.Format("Hello {0} {1}", person.first, person.last);
 }