示例#1
0
 private void button3_Click(object sender, EventArgs e)
 {
     Elefant holder;
     holder = lloyd;
     lloyd = lucinda;
     lucinda = holder;
     MessageBox.Show("Objects Swapped!");
 }
示例#2
0
 private void button4_Click(object sender, EventArgs e)
 {
     lloyd = lucinda;
     lloyd.earSize = 4321;
     lloyd.whoAmI();
 }
示例#3
0
 public Form1()
 {
     InitializeComponent();
     lucinda = new Elefant() { name = "Lucinda", earSize = 33 };
     lloyd = new Elefant() { name = "Lloyd", earSize = 40 };
 }