Esempio n. 1
0
        static void Main(string[] args)
        {
            DrinksMachine myMachine = new DrinksMachine();

            myMachine.Make     = "KitchenAid";
            myMachine.Model    = "DM1000";
            myMachine.Location = "Kitchen";
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            DrinksMachine machine = new DrinksMachine("cs50", "Japan")
            {
                Location = "Tokyo"
            };

            string x1 = machine.Location;

            machine.Location = "Tokyo+1";

            string x2 = machine.Make;
            string x3 = machine.Model;

            Console.WriteLine("Location: " + x1 + " | made: " + x2 + " | model:" + x3 + " | ");

            Console.ReadKey();
        }