Exemplo n.º 1
0
 static void Main(string[] args)
 {
     // Readonly.ReadonlyMain();
     // Readwrite.readWriteMain();
     // StaticProperty.staticPropertyMain();
     // OverrideProperty.OverridePropertyMain();
     // AbstractExample.ExampleMain();
     CupOfCoffee.InterfaceMain();
 }
Exemplo n.º 2
0
        public static void InterfaceMain()
        {
            // Create an instance of a Cup of Coffee Class
            bool        i     = false;
            CupOfCoffee myCup = new CupOfCoffee(i);

            Console.WriteLine("myCup's instant value is:" + myCup.Instant);

            // let's change the value of Instant
            myCup.Instant = true;
            Console.WriteLine("myCup's instant value is:" + myCup.Instant);
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            //GetterAndSetter getterAndSetter = new GetterAndSetter();
            //getterAndSetter.getterAndSetterMain();
            //OverrideProperty.OverridePropertyMain // Create an instance of a Cup of Coffee Class
            bool        i     = false;
            CupOfCoffee myCup = new CupOfCoffee(i);

            Console.WriteLine("myCup's instant value is:" + myCup.Instant);

            // let's change the value of Instant
            myCup.Instant = true;
            Console.WriteLine("myCup's instant value is:" + myCup.Instant);
        }