Beispiel #1
0
    public int[] StructLinq_ValueDelegate()
    {
        var selector = new TripleOfInt32();

        return(StructEnumerable
               .Range(Start, Count)
               .Select(ref selector, x => x, x => x)
               .ToArray(x => x));
    }
Beispiel #2
0
        public int[] StructLinq_IFunction()
        {
            var selector = new DoubleOfInt32();

            return(StructEnumerable
                   .Range(Start, Count)
                   .Select(ref selector, x => x, x => x)
                   .ToArray(x => x));
        }
Beispiel #3
0
        public int StructLinq()
        {
            var sum = 0;

            foreach (var item in StructEnumerable.Range(0, Count))
            {
                sum += item;
            }
            return(sum);
        }
Beispiel #4
0
    public int StructLinq()
    {
        var items = StructEnumerable.Range(Start, Count);
        var sum   = 0;

        foreach (var item in items)
        {
            sum += item;
        }
        return(sum);
    }
Beispiel #5
0
    public int StructLinq_ValueDelegate()
    {
        var selector = new TripleOfInt32();
        var items    = StructEnumerable
                       .Range(Start, Count)
                       .Select(ref selector, x => x, x => x);
        var sum = 0;

        foreach (var item in items)
        {
            sum += item;
        }
        return(sum);
    }
Beispiel #6
0
 public int[] StructLinq()
 => StructEnumerable
 .Range(Start, Count)
 .Select(item => item * 3)
 .ToArray();
Beispiel #7
0
 public int[] StructLinq()
 => StructEnumerable
 .Range(Start, Count)
 .ToArray(x => x);
 public int[] StructLinq()
 => StructEnumerable.Range(0, Count).ToArray();