WCF摘记

           //绑定形式
            NetTcpBinding bind = new NetTcpBinding();
            //地址
            EndpointAddress address = new EndpointAddress("net.tcp://localhost:3200/hello");
            //通道工厂
            ChannelFactory<ClassLibrary1.myInterface> factory = new ChannelFactory<ClassLibrary1.myInterface>(bind,address);

            ClassLibrary1.myInterface myobject = factory.CreateChannel();
            string time = myobject.getServerTime();
            MessageBox.Show(time);