protected void Page_Load(object sender, EventArgs e) { Service2Client wcfTest = new Service2Client(); Label1.Text = wcfTest.DoWork(); wcfTest.Close(); }
static void Main(string[] args) { Service1Client proxy1 = new Service1Client(); IService2 proxy2 = new Service2Client(); Console.WriteLine(proxy1.GetData(10)); Console.WriteLine(proxy2.DoWork("Nilesh")); Console.ReadLine(); }
private void button3_Click(object sender, EventArgs e) { System.ServiceModel.InstanceContext instanceContext = new System.ServiceModel.InstanceContext(new CalculatorCallback()); var sc = new Service2Client(instanceContext); sc.DoWork(); }