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<in t,bool>' does not take '2'
arguments. Does anybody know the correct syntax?
*** Sent via Developersdex http://www.developersdex.com ***
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<in t,bool>' does not take '2'
arguments. Does anybody know the correct syntax?
*** Sent via Developersdex http://www.developersdex.com ***
Comment