public void CallStructEnumeratorBoxed()
        {
            IEnumerable <int> enumerable = new RangeEnumerable(0, this.Count);
            long sum = 0L;

            foreach (var item in enumerable)
            {
                sum += item;
            }
            sum.ToString();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            IEnumerable <int> enumerable = new RangeEnumerable(0, 100000);
            long sum = 0L;

            foreach (var item in enumerable)
            {
                sum += item;
            }
            sum.ToString();
            BenchmarkRunner.Run <EnumerableInterfaceMethodsBenchmark>();
            Console.ReadLine();
        }