public static void Main()
Console.WriteLine(Test.Two.HasFlag(Test.None));
Console.WriteLine(Contains(Test.Three, Test.One));
public static bool Contains<T>(T types, T type) where T : Enum
TypeCode typeCode = types.GetTypeCode();
int typeInt = (int)(object)type;
int typesInt = (int)(object)types;
return (typesInt & typeInt) == typeInt;