public int GenericClassGenericInstanceMethod() { GenericClass <int> aGenericClassWithInt = aGenericClassWithIntField; int x = 0; for (int i = 0; i < InnerIterationCount; i++) { x = aGenericClassWithInt.ClassGenericInstanceMethod(); } return(x); }
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); }