How will you find the index of the element using where () with lambda expressions?
Answer Posted / Rahul Yadav
LINQ does not directly provide a method to get an index of an item within a collection. However, you can use Enumerable.ElementAt() or Enumerable.First() extension methods in conjunction with Where() to get the first element matching a condition, effectively getting the indexed element if you know the position.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category