private void btnBadPayload_Click(object sender, EventArgs ea) { var client = new JokeContractClient(cbo.Text); try { var bad = new BadClass(); bad.Click += btnBadMsg_Click; var echoed = client.ObjectWork(bad); Text = echoed.ToString(); } catch (Exception e) { Text = e.ToMessageWithType(); } client.Dispose(); }