IsPrimitive() public static method

public static IsPrimitive ( this self ) : bool
self this
return bool
Esempio n. 1
0
        public static bool TryGetPrimitiveElementType(TypeDefinition type, out ElementType etype)
        {
            etype = ElementType.None;

            if (type.Namespace != "System")
            {
                return(false);
            }

            Row <ElementType, bool> primitive_data;

            if (TryGetPrimitiveData(type, out primitive_data) && Mixin.IsPrimitive(primitive_data.Col1))
            {
                etype = primitive_data.Col1;
                return(true);
            }

            return(false);
        }