Esempio n. 1
0
        static void Main(string[] args)
        {
            myclass mc1 = new myclass();
            myclass mc2 = new myclass();

            mc1.instMemember     = 1;
            mc1.instMemember     = 1;
            myclass.staticmember = 100;


            Console.WriteLine("mc1: instmember = {0}, stat mem: = {1}", mc1.instMemember, mc1.getstaticvalue());
            Console.WriteLine();
            Console.WriteLine("mc2: instmember = {0}, stat mem: = {1}", mc2.instMemember, mc2.getstaticvalue());

            myclass.staticmember = 500;

            Console.WriteLine("mc1: instmember = {0}, stat mem: = {1}", mc1.instMemember, mc1.getstaticvalue());
            Console.WriteLine();
            Console.WriteLine("mc2: instmember = {0}, stat mem: = {1}", mc2.instMemember, mc2.getstaticvalue());
        }