find index of an int in a list
Use the .IndexOf()
method of the list. Specs for the method can be found on MSDN.
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;