Основные методы
Основные методы
Основные методы
Основные методы
static void Main(string[] args) { EndpointAddress address = new EndpointAddress("http://localhost:1234/UserInfo"); WSHttpBinding binding = new WSHttpBinding(); ChannelFactory <IUserInfo> factory = new ChannelFactory <IUserInfo>(binding, address); IUserInfo channel = factory.CreateChannel(); IAsyncResult ar = channel.BeginGetInfo(null, GetInfoCallback, channel); Console.WriteLine("此字符串在调用方法前输出,说明异步调用成功!"); Console.Read(); }