You can also use this:
mylist.Where(x => x > 10) .Select((x,index) => ExecuteYourFunction(x, index));
Or if your method has no return value:
mylist.Where(x => x > 10) .Select((x,index) => new { Index = index, Value= x }) .ToList() .Foreach(myType => ExecuteYourFunction(myType.Name, myType.Index));
source share