T
Tony Johansson
Hello!
In this simple example where I have two operators which are .Where and
..OrderBy.
I just wonder how this work. As I have understood it works like this.
First will the Where clause be called to return true for all value in the
collection that is less then 4 which give 2 ,1 and 3
But now which data will be input to the last operator OrderBy ?
So will the operator .OrderBy have as input those values that is return as
true from the Where operator whic is 2 ,1 and 3
int[] nums = new int[]{6,2,7,1,9,3};
IEnumerable<int> numsLessThenFour = nums
..Where(i => i<4)
..OrderBy(i => i);
//Tony
In this simple example where I have two operators which are .Where and
..OrderBy.
I just wonder how this work. As I have understood it works like this.
First will the Where clause be called to return true for all value in the
collection that is less then 4 which give 2 ,1 and 3
But now which data will be input to the last operator OrderBy ?
So will the operator .OrderBy have as input those values that is return as
true from the Where operator whic is 2 ,1 and 3
int[] nums = new int[]{6,2,7,1,9,3};
IEnumerable<int> numsLessThenFour = nums
..Where(i => i<4)
..OrderBy(i => i);
//Tony