private void btnGoSync_Click(object sender, RoutedEventArgs e) { try { var response = new HelloResponse { Result = "Hello, " + txtName.Text }; var json = response.ToJson(); lblResults.Content = json; } catch (Exception ex) { lblResults.Content = ex.ToString(); } }