find inf list string contains value code example Example: list contains type c# if (within.OfType<Ball>().Any())