private void SwapB3_Click(object sender, EventArgs e) { Elephant holder; holder = Lloyd; Lloyd = Lucinda; Lucinda = holder; MessageBox.Show("Objects Swapped!!!!!"); }
public void TellMe(string message, Elephant whoSaidIt) { MessageBox.Show(whoSaidIt.Name + " says: " + message); }
public void SpeakTo(Elephant whoToTalkTo, string message) { whoToTalkTo.TellMe(message, this); }
public Form1() { InitializeComponent(); Lucinda = new Elephant() { Name = "Lucinda", EarSize = 33 }; Lloyd = new Elephant() { Name = "Lloyd", EarSize = 40 }; }