예제 #1
0
        static void Main(string[] args)
        {
            NetTcpBinding   binding            = new NetTcpBinding();
            EndpointAddress addr               = new EndpointAddress("net.tcp://localhost:5000/demotcp");
            ChannelFactory <IHelloService> chn = new ChannelFactory <IHelloService>(binding, addr);
            IHelloService obj = chn.CreateChannel();

            Console.WriteLine(obj.DoWork("Omkara.....!!!"));
            Console.WriteLine("Done");
            Console.ReadLine();
        }