private void button1_Click(object sender, EventArgs e) { try { // A classe Proxy gerada a partir da metadata tem vĂ¡rios construtores: //ServiceClient() //ServiceClient(string endpointConfigurationName) //ServiceClient(string endpointConfigurationName, string remoteAddress) //ServiceClient(ServiceClient(string endpointConfigurationName, EndpointAddress remoteAddress) //ServiceClient(ServiceClient(string endpointConfigurationName, EndpointAddress remoteAddress) ServiceClient prx = new ServiceClient(textBox4.Text, comboBox1.Text); int res = prx.add(int.Parse(textBox1.Text), int.Parse(textBox2.Text)); textBox3.Text = res.ToString(); } catch (Exception ex) { MessageBox.Show("Erro!!"+ex.Message); } }