c# list where value exists in one attribute or other attribute code example
Example 1: list contains type c#
if (within.OfType<Ball>().Any())
Example 2: c# check list of objects for value
var matches = myList.Where(p => p.Name == nameToExtract);