public void HearMessage(string message, Elephant whoSaidIt) { Console.WriteLine(Name + " heard a message"); Console.WriteLine(whoSaidIt.Name + " said this: " + message); }
public void SpeakTo(Elephant whoToTalkTo, string message) { whoToTalkTo.HearMessage(message, this); }
private void Button1_Click(object sender, EventArgs e) { lloyd = lucinda; lloyd.EarSize = 4321; lloyd.WhoAmI(); }