static void _Main(string[] args) { HelloCallback callback = new HelloCallback(); InstanceContext clientContext = new InstanceContext(callback); WSDualHttpBinding binding = new WSDualHttpBinding(); EndpointAddress remoteAddress = new EndpointAddress("http://localhost:1000/MyService/HelloService"); HelloClient client = new HelloClient(clientContext, binding, remoteAddress); client.World(); }
static void Main(string[] args) { using (HelloClient client = new HelloClient()) { string s = client.SayHello("Frodo"); Console.WriteLine(s); } Console.WriteLine(); Console.WriteLine("Press <ENTER> to terminate client"); Console.ReadLine(); }