Exemple #1
0
        public void CallVariables()
        {
            InstanceAndStatic obj = new InstanceAndStatic();

            Console.WriteLine(obj.Id);
            Console.WriteLine(InstanceAndStatic.counter);
        }
Exemple #2
0
        public static void IamStatic()
        {
            InstanceAndStatic obj = new InstanceAndStatic();

            obj.Id  = 5;
            counter = 3;
        }
Exemple #3
0
        public void CallMethods()
        {
            InstanceAndStatic obj = new InstanceAndStatic();

            obj.SetData();

            InstanceAndStatic.IamStatic();
        }