using System.Collections;
using System.Collections.Generic;
private static readonly IEnumerable<Type> _allowedTypes = new[]
public static void Main()
_allowedTypes.Contains(t1.GetType()).Dump();
_allowedTypes.Contains(t2.GetType()).Dump();
_allowedTypes.Contains(t3.GetType()).Dump();