value in list c# code example
Example 1: c# verify in class exist in list
Item wonderIfItsPresent = ...
bool containsItem = myList.Any(item => item.UniqueProperty == wonderIfItsPresent.UniqueProperty);'
Example 2: c# check list of objects for value
var matches = myList.Where(p => p.Name == nameToExtract);