how to check if a list of items C#\ code example Example: list contains type c# if (within.OfType<Ball>().Any())