M
Mike P
I am working through the LINQ 101 examples, and have found another
error, for the FirstIndexed example :
int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 };
int evenNum = numbers.First((num, index) => (num % 2 == 0) &&
(index % 2 == 0));
lbl.Text = evenNum + " is an even number at an even position
within the list.";
The error is : Delegate 'System.Func<int,bool>' does not take '2'
arguments. Does anybody know the correct syntax?
error, for the FirstIndexed example :
int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 };
int evenNum = numbers.First((num, index) => (num % 2 == 0) &&
(index % 2 == 0));
lbl.Text = evenNum + " is an even number at an even position
within the list.";
The error is : Delegate 'System.Func<int,bool>' does not take '2'
arguments. Does anybody know the correct syntax?