object result = oMeth.Invoke(oProxy,@params);
public string GetData(int value) { return string.Format("You entered: {0}", value); }
ChannelFactory<WcfService1.IService1> myFactory = default(ChannelFactory<WcfService1.IService1>); myFactory = new ChannelFactory<WcfService1.IService1>(new BasicHttpBinding(), "http://localhost:3250"); object oProxy = myFactory.CreateChannel(); Type oType = oProxy.GetType(); MethodInfo oMeth = oType.GetMethod("GetData"); object[] @params = { 3 }; object result = oMeth.Invoke(oProxy,@params);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)