Free mag vol1 | Page 267

CHAPTER 5  UNDERSTANDING ENCAPSULATION With this update, you could now place a Car object into the Garage object as so: static void Main(string[] args) { Console.WriteLine("***** Fun with Automatic Properties *****\n"); // Make a car. Car c = new Car(); c.PetName = "Frank"; c.Speed = 55; c.Color = "Red"; c.DisplayStats(); // Put car in the garage. Garage g = new Garage(); g.MyAuto = c; Console.Write Ɩ