get the value that has a certain value from a list of classes c# code example
Example 1: c# find element by condition
int[] plantHeights = { 3, 6, 4, 1, 6, 8 };
// Find the first occurence of a plant height that is greater
// than 5 inches
int firstHeight = Array.Find(plantHeights, height => height>5);
Example 2: how to locate a specific element in a list c#
//7 will be the spot in the list
List<int> intList = new List<int>();
int x = List[7];