namespace System
{
public static class EnumExtension
{
public static T AddFlag<T>(this Enum type, T value)
{
return (T)(object)(((int)(object)type | (int)(object)value));
}
public static T RemoveFlag<T>(this Enum type, T value)
{
return (T)(object)(((int)(object)type & ~(int)(object)value));
}
}
}