static void Main(string[] args) { var smallApartment = new SmallApartment(); var person = new Person(); person.Name = "Matt"; person.House = smallApartment; person.ShowData(); Console.Read(); }
static void Main(string[] args) { Person person = new Person("Pepe"); SmallApartment depto = new SmallApartment(); Door door = new Door("cafe"); depto.MyDoor = door; person.MyHouse = depto; person.ShowData(); }
static void Main(string[] args) { var person = new Person("Leandro"); var smallAppartment = new SmallApartment(); var door = new Door("Brown"); smallAppartment.Door = door; person.House = smallAppartment; person.ShowHouse(); }
static void Main(string[] args) { bool debug = true; var mySmallApartment = new SmallApartment(); var myPerson = new Person(); myPerson.Name = "Bao"; myPerson.House = mySmallApartment; myPerson.House.Door.Color = "yellow"; myPerson.ShowData(); if (debug) { Console.ReadLine(); } }