I am novice in writing lambda expressions and I have the next problem:
I have
List<int> lifeField;
I want to find index of those members, that correspond to next condition:
(((number % (10 * currentMove)) == 1) || ((number % (10 * currentMove)) == 2))
where number is member of List and currentMove is integer - 0,1,2
For example:
if it is first move
currentMove = 0
I search number 1 or 2
if it is second move
I search numbers 11,21
……
I want to find how to write this here with lambda…. or in other function
int indexOfLife = Array.FindIndex(lifeField, ?????????);
1 Answer