private void joeGivesToBob_Click(object sender, EventArgs e) { if (joe.Cash >= 10) { bob.Cash += joe.GiveCash(10); UpdateForm(); } else { MessageBox.Show("Joe is out of money."); } }
private void button2_Click(object sender, EventArgs e) { bank += bob.GiveCash(5); UpdateForm(); }