+ case TypeCode.Int32:
+ parsed = TryParseInt32Enum(rt, value, valueSpan, int.MinValue, int.MaxValue, ignoreCase, throwOnFailure, nameof(SR.Overflow_Int32), out intResult);
+ result = parsed ? InternalBoxEnum(rt, intResult) : null;
+ return parsed;
+
+ case TypeCode.Byte:
+ parsed = TryParseUInt32Enum(rt, value, valueSpan, byte.MaxValue, ignoreCase, throwOnFailure, nameof(SR.Overflow_Byte), out uintResult);
+ result = parsed ? InternalBoxEnum(rt, uintResult) : null;
+ return parsed;
+
+ case TypeCode.UInt16:
+ parsed = TryParseUInt32Enum(rt, value, valueSpan, ushort.MaxValue, ignoreCase, throwOnFailure, nameof(SR.Overflow_UInt16), out uintResult);
+ result = parsed ? InternalBoxEnum(rt, uintResult) : null;
+ return parsed;
+
+ case TypeCode.UInt32:
+ parsed = TryParseUInt32Enum(rt, value, valueSpan, uint.MaxValue, ignoreCase, throwOnFailure, nameof(SR.Overflow_UInt32), out uintResult);
+ result = parsed ? InternalBoxEnum(rt, uintResult) : null;
+ return parsed;
+
+ case TypeCode.Int64:
+ parsed = TryParseInt64Enum(rt, value, valueSpan, ignoreCase, throwOnFailure, out long longResult);
+ result = parsed ? InternalBoxEnum(rt, longResult) : null;
+ return parsed;
+
+ case TypeCode.UInt64:
+ parsed = TryParseUInt64Enum(rt, value, valueSpan, ignoreCase, throwOnFailure, out ulong ulongResult);
+ result = parsed ? InternalBoxEnum(rt, (long)ulongResult) : null;
+ return parsed;
+
+ default:
+ return TryParseRareEnum(rt, value, valueSpan, ignoreCase, throwOnFailure, out result);