Beispiel #1
0
 private void btnSwap_Click(object sender, EventArgs e)
 {
     Elephant swap = lloyd;
     lloyd = lucinda;
     lucinda = swap;
     swap = null;
 }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            lloyd.TellMe("Hi", lucinda);
            lloyd.SpeakTo(lucinda, "Hello");

            lloyd = lucinda;
            lloyd.EarSize = 4321;
            lloyd.WhoAmI();
        }
 public void TellMe(string message, Elephant whoSaidIt)
 {
     MessageBox.Show(whoSaidIt.Name + " says: " + message);
 }
 public void SpeakTo(Elephant whoToTalkTo, string message)
 {
     whoToTalkTo.TellMe(message, this);
 }
Beispiel #5
0
 public void SpeakTo(Elephant whoToTalkTo, string message)
 {
     whoToTalkTo.TellMe(message, this);
 }
Beispiel #6
0
 public void TellMe(string message, Elephant whoSaidIt)
 {
     MessageBox.Show(whoSaidIt.Name + " says: " + message);
 }
Beispiel #7
0
 private void button1_Click(object sender, EventArgs e)
 {
     Lloyd         = Lucinda;
     Lloyd.EarSize = 4321;
     Lloyd.WhoAmI();
 }