All the examples I see of using the IndexOf() method in List are of basic string types. What I want to know is how to return the index of
IndexOf()
List
public int FindIndex(Predicate match);
Using lambdas:
employeeList.FindIndex(r => r.LastName.Equals("Something"));
Note:
// Returns: // The zero-based index of the first occurrence of an element // that matches the conditions defined by match, if found; // otherwise, –1.