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