static void Main(string[] args)
 {
     Readonly.GetterName();
     GetterAndSetter.GetterSetterMain();
     OverrideProperty.OverridePropertyMain();
     AbstractExample.ExampleMain();
 }
Пример #2
0
        public static void ReadonlyMain()
        {
            Readonly a = new Readonly();

            int gg = a.ff + 9;

            Console.WriteLine(gg);
        }
        public static void GetterName()
        {
            Readonly a = new Readonly();
            int      x = a.ff + 9;

            Console.WriteLine(x);
            Method1();              //static method can only call static directly(eitherby class name or direct)
            a.Meth();               // static method calling non static only by instance creation
        }
Пример #4
0
        public static void ReadonlyMain()
        {
            Readonly a = new Readonly();

            int gg = a.ff + 9;

            System.Console.WriteLine(gg);
            Console.WriteLine("Hello World!");
        }