Пример #1
0
        public Class64 Copy64()
        {
            Class64 s = new Class64();

            s.Value1        = new Class32();
            s.Value2        = new Class32();
            s.Value1.Value1 = new Class8();
            s.Value1.Value2 = new Class8();
            s.Value1.Value3 = new Class8();
            s.Value1.Value4 = new Class8();

            s.Value2.Value1 = new Class8();
            s.Value2.Value2 = new Class8();
            s.Value2.Value3 = new Class8();
            s.Value2.Value4 = new Class8();

            s.Value1.Value1.Value1 = 1;
            s.Value1.Value1.Value2 = 2;
            s.Value1.Value2.Value1 = 3;
            s.Value1.Value2.Value2 = 4;
            s.Value1.Value3.Value1 = 5;
            s.Value1.Value3.Value2 = 6;
            s.Value1.Value4.Value1 = 7;
            s.Value1.Value4.Value2 = 8;

            s.Value2.Value1.Value1 = 9;
            s.Value2.Value1.Value2 = 10;
            s.Value2.Value2.Value1 = 11;
            s.Value2.Value2.Value2 = 12;
            s.Value2.Value3.Value1 = 13;
            s.Value2.Value3.Value2 = 14;
            s.Value2.Value4.Value1 = 15;
            s.Value2.Value4.Value2 = 16;

            for (int i = 0; i < 100.000; i++)
            {
                s = CopyBack(s);
            }

            return(s);
        }
Пример #2
0
        public void ClassSize64()
        {
            for (int i = 0; i < _class64.Length; i++)
            {
                Class64 s = new Class64();
                s.Value1        = new Class32();
                s.Value2        = new Class32();
                s.Value1.Value1 = new Class8();
                s.Value1.Value2 = new Class8();
                s.Value1.Value3 = new Class8();
                s.Value1.Value4 = new Class8();

                s.Value2.Value1 = new Class8();
                s.Value2.Value2 = new Class8();
                s.Value2.Value3 = new Class8();
                s.Value2.Value4 = new Class8();

                s.Value1.Value1.Value1 = i;
                s.Value1.Value1.Value2 = i;
                s.Value1.Value2.Value1 = i;
                s.Value1.Value2.Value2 = i;
                s.Value1.Value3.Value1 = i;
                s.Value1.Value3.Value2 = i;
                s.Value1.Value4.Value1 = i;
                s.Value1.Value4.Value2 = i;

                s.Value2.Value1.Value1 = i;
                s.Value2.Value1.Value2 = i;
                s.Value2.Value2.Value1 = i;
                s.Value2.Value2.Value2 = i;
                s.Value2.Value3.Value1 = i;
                s.Value2.Value3.Value2 = i;
                s.Value2.Value4.Value1 = i;
                s.Value2.Value4.Value2 = i;

                _class64[i] = s;
            }
        }
Пример #3
0
 private Class64 CopyBack(Class64 c)
 {
     return(c);
 }