public static TypeCode GetTypeCode(this Type type)
{
#if NET_CORE
if (type == null)
return TypeCode.Empty;
TypeCode code;
if (!TypeCodeMap.TryGetValue (type, out code))
return TypeCode.Object;
return code;
#else
return Type.GetTypeCode (type);
#endif
}