How to find the index of an item in a C# list in a single step?
Answers
Answered by
0
int index = myList.FindIndex(a => a.Prop == oProp);
This method performs a linear search; therefore, this method is an O(n) operation, where n is Count.
Similar questions