public int[] StructLinq_IFunction()
        {
            var predicate = new Int32IsEven();
            var selector  = new DoubleOfInt32();

            return(source.ToStructEnumerable()
                   .Where(ref predicate, x => x)
                   .Select(ref selector, x => x, x => x)
                   .ToArray(x => x));
        }
Esempio n. 2
0
        public int StructLinq_IFunction()
        {
            var sum      = 0;
            var selector = new DoubleOfInt32();

            foreach (var item in source.ToStructEnumerable().Select(ref selector, x => x, x => x))
            {
                sum += item;
            }
            return(sum);
        }
Esempio n. 3
0
 public int StructLinq_IFunction()
 {
     var sum = 0;
     var selector = new DoubleOfInt32();
     foreach (var item in source
         .ToStructEnumerable()
         .Skip((uint)Skip, x=> x)
         .Take((uint)Count, x=> x)
         .Select(ref selector, x => x, x => x))
         sum += item;
     return sum;
 }