private void button3_Click(object sender, EventArgs e) { Elephant TempRef; TempRef = Lloyd; Lloyd = Lucinda; Lucinda = TempRef; MessageBox.Show("Objects swapped"); }
private void button4_Click(object sender, EventArgs e) { Lloyd = Lucinda; Lloyd.EarSize = 4321; Lloyd.WhoAmI(); }
public Form1() { InitializeComponent(); Lloyd = new Elephant() { Name = "Lloyd", EarSize = 33}; Lucinda = new Elephant() { Name = "Lucinda", EarSize = 40}; }