Exemple #1
0
        public static bool IsCompatibleWith(Type type)
        {
            if (!type.IsEnum)
            {
                return(false);
            }
            var enumUnderlyingType = type.GetEnumUnderlyingType();

            return(SignedFieldHandler.IsCompatibleWith(enumUnderlyingType) || UnsignedFieldHandler.IsCompatibleWith(enumUnderlyingType));
        }
Exemple #2
0
 static bool IsSignedEnum(Type enumType)
 {
     return(SignedFieldHandler.IsCompatibleWith(enumType.GetEnumUnderlyingType()));
 }