SyntaxFix
Write A Post
Hire A Developer
Questions
FindIndex seems to be what you're looking for:
FindIndex(Predicate<T>)
Usage:
list1.FindIndex(x => x==5);
Example:
// given list1 {3, 4, 6, 5, 7, 8} list1.FindIndex(x => x==5); // should return 3, as list1[3] == 5;