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 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,1, 2, 3, 4,}
var a = arr.Where(x => x > q).Select(x => x + 3).Sum();
Stopwatch sw1 =new Stopwatch();
var b= Method1_ProceduralLinq1(arr, q);
Console.WriteLine(sw0.ElapsedTicks);
Console.WriteLine(sw1.ElapsedTicks);
private static int Method1_ProceduralLinq1(int[] _linqitems, int q)
if (_linqitems == null) throw new ArgumentNullException();
for (int i = 0; i < _linqitems.Length; i++)
int num2 = _linqitems[i];