Esempio n. 1
0
        static void Main(string[] args)
        {
            var smallApartment = new SmallApartment();
            var person         = new Person();

            person.Name  = "Matt";
            person.House = smallApartment;
            person.ShowData();

            Console.Read();
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
        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();
            }
        }