private void button3_Click(object sender, EventArgs e) { localhost.CounterServiceClient proxy = GetProxy(); try { proxy.IncrementCounter(); proxy.ThrowFault(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } try { proxy.IncrementCounter(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } try { proxy.Close(); } catch { } }
private void button1_Click(object sender, EventArgs e) { localhost.CounterServiceClient proxy = GetProxy(); proxy.IncrementCounter(); proxy.IncrementCounter(); }