示例#1
0
        public int GenericClassGenericInstanceMethod()
        {
            GenericClass <int> aGenericClassWithInt = aGenericClassWithIntField;

            int x = 0;

            for (int i = 0; i < InnerIterationCount; i++)
            {
                x = aGenericClassWithInt.ClassGenericInstanceMethod();
            }

            return(x);
        }
示例#2
0
        public static int GenericClassGenericInstanceMethod()
        {
            GenericClass <int> aGenericClassWithInt = new GenericClass <int>();

            int x = 0;

            foreach (var iteration in Benchmark.Iterations)
            {
                using (iteration.StartMeasurement())
                    for (int i = 0; i < Benchmark.InnerIterationCount; i++)
                    {
                        x = aGenericClassWithInt.ClassGenericInstanceMethod();
                    }
            }

            return(x);
        }