private void btnSubtract_Click(object sender, EventArgs e) { var myNum = new wref.MyNumbers { Number1 = int.Parse(txtNumber1.Text), Number2 = int.Parse(txtNumber2.Text) }; txtResult.Text = _client.Subtract(myNum).ToString(); }
private void btnSubtractAsync_Click(object sender, EventArgs e) { var myNum = new wref.MyNumbers { Number1 = int.Parse(txtNumber1.Text), Number2 = int.Parse(txtNumber2.Text) }; _client.SubtractCompleted += new EventHandler <wref.SubtractCompletedEventArgs>(client_SubtractComplited); _client.SubtractAsync(myNum); }