System.Runtime.Serialization.Formatters.Binary.Converter.ToPrimitiveTypeEnum C# (CSharp) Method

ToPrimitiveTypeEnum() static private method

static private ToPrimitiveTypeEnum ( TypeCode typeCode ) : InternalPrimitiveTypeE
typeCode TypeCode
return InternalPrimitiveTypeE
        internal static InternalPrimitiveTypeE ToPrimitiveTypeEnum(TypeCode typeCode)
        {
            if (s_codeA == null)
            {
                InitCodeA();
            }
            return s_codeA[(int)typeCode];
        }

Usage Example

        // Token: 0x0600538E RID: 21390 RVA: 0x00127AF8 File Offset: 0x00125CF8
        internal static InternalPrimitiveTypeE ToCode(Type type)
        {
            InternalPrimitiveTypeE result;

            if (type != null && !type.IsPrimitive)
            {
                if (type == Converter.typeofDateTime)
                {
                    result = InternalPrimitiveTypeE.DateTime;
                }
                else if (type == Converter.typeofTimeSpan)
                {
                    result = InternalPrimitiveTypeE.TimeSpan;
                }
                else if (type == Converter.typeofDecimal)
                {
                    result = InternalPrimitiveTypeE.Decimal;
                }
                else
                {
                    result = InternalPrimitiveTypeE.Invalid;
                }
            }
            else
            {
                result = Converter.ToPrimitiveTypeEnum(Type.GetTypeCode(type));
            }
            return(result);
        }
All Usage Examples Of System.Runtime.Serialization.Formatters.Binary.Converter::ToPrimitiveTypeEnum