#how to check if an object is in a list c# code example Example: c# check list of objects for value var matches = myList.Where(p => p.Name == nameToExtract);