Beispiel #1
0
        // returns 999
        static int Main(string[] args)
        {
            foo f = new foo();

            f.SetCount(1000);
            return(f.GetCount());
        }
Beispiel #2
0
        // returns 1234
        static int Main(string[] args)
        {
            foo f = new foo();

            f.z = 1234;
            return(f.z);
        }
Beispiel #3
0
        // returns 684870
        static int Main(string[] args)
        {
            foo f = new foo();

            f.z = 1234;
            foo f2 = new foo();

            f2.z = 555;
            return(f.z * f2.z);
        }
Beispiel #4
0
        // returns 9999
        static int Main(string[] args)
        {
            bar b = new bar();
             foo f = new foo();
             b.f = f;

             if(b.f == f)
            return 9999;
             else
            return -1;
        }
Beispiel #5
0
        // returns 45
        static int Main(string[] args)
        {
            int counter = 0;
             for (int i = 0; i < 10; ++i)
             {
            foo f = new foo();
            f.z = i;
            counter += f.z;
             }

             return counter;
        }
Beispiel #6
0
        // returns 45
        static int Main(string[] args)
        {
            int counter = 0;

            for (int i = 0; i < 10; ++i)
            {
                foo f = new foo();
                f.z      = i;
                counter += f.z;
            }

            return(counter);
        }
Beispiel #7
0
        // returns 9999
        static int Main(string[] args)
        {
            bar b = new bar();
            foo f = new foo();

            b.f = f;

            if (b.f == f)
            {
                return(9999);
            }
            else
            {
                return(-1);
            }
        }
Beispiel #8
0
 // returns 1234
 static int Main(string[] args)
 {
     foo f = new foo();
     f.z = 1234;
     return f.z;
 }
Beispiel #9
0
 // returns 999
 static int Main(string[] args)
 {
     foo f = new foo();
     f.SetCount(1000);
     return f.GetCount();
 }
Beispiel #10
0
 public bar()
 {
     m_foo       = new foo();
     m_foo.value = 42;
 }