c# check if type contains type code example Example: list contains type c# if (within.OfType().Any())