C# how to implement contains on a list code example Example: list contains type c# if (within.OfType<Ball>().Any())