Esempio n. 1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (client.State == System.ServiceModel.CommunicationState.Faulted)
         {
             client = new HelloService.HelloServiceClient();
         }
         lblResult.Text = client.GetMessage(txtName.Text);
     }
     catch (Exception exception)
     {
         lblResult.Text = exception.Message;
     }
 }
Esempio n. 2
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     HelloService.HelloServiceClient client = new HelloService.HelloServiceClient();
     lblResult.Text = client.GetMessage(txtName.Text);
 }