11[TypeForwardedFrom(
"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
12public readonly
struct UInt32 :
IComparable,
IConvertible,
ISpanFormattable,
IFormattable,
IComparable<uint>,
IEquatable<uint>,
IBinaryInteger<uint>,
IBinaryNumber<uint>,
IBitwiseOperators<uint, uint, uint>,
INumber<uint>,
IAdditionOperators<uint, uint, uint>,
IAdditiveIdentity<uint, uint>,
IComparisonOperators<uint, uint>,
IEqualityOperators<uint, uint>,
IDecrementOperators<uint>,
IDivisionOperators<uint, uint, uint>,
IIncrementOperators<uint>,
IModulusOperators<uint, uint, uint>,
IMultiplicativeIdentity<uint, uint>,
IMultiplyOperators<uint, uint, uint>,
ISpanParseable<uint>,
IParseable<uint>,
ISubtractionOperators<uint, uint, uint>,
IUnaryNegationOperators<uint, uint>,
IUnaryPlusOperators<uint, uint>,
IShiftOperators<uint, uint>,
IMinMaxValue<uint>,
IUnsignedNumber<uint>
20 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
23 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
26 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
29 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
32 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
35 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
44 if (
value is uint num)
72 public override bool Equals([NotNullWhen(
true)]
object?
obj)
78 return this == (uint)
obj;
161 public static bool TryParse([NotNullWhen(
true)]
string?
s, out uint result)
273 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
279 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
285 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
291 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
297 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
303 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
309 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
315 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
321 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
327 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
333 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
339 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
345 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
351 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
354 return left <= right;
357 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
363 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
366 return left >= right;
369 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
375 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
381 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
384 return left == right;
387 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
390 return left != right;
393 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
399 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
405 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
411 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
417 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
424 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
427 if (typeof(TOther) == typeof(
byte))
429 return (
byte)(object)
value;
431 if (typeof(TOther) == typeof(
char))
433 return (
char)(object)
value;
435 if (typeof(TOther) == typeof(decimal))
437 return (uint)(decimal)(
object)
value;
441 if (typeof(TOther) == typeof(
double))
443 return (uint)(double)(
object)
value;
445 if (typeof(TOther) == typeof(
short))
449 if (typeof(TOther) == typeof(
int))
451 return (uint)(int)(
object)
value;
453 if (typeof(TOther) == typeof(
long))
455 return (uint)(long)(
object)
value;
457 if (typeof(TOther) == typeof(
IntPtr))
461 if (typeof(TOther) == typeof(sbyte))
463 return (uint)(sbyte)(
object)
value;
465 if (typeof(TOther) == typeof(
float))
467 return (uint)(float)(
object)
value;
469 if (typeof(TOther) == typeof(ushort))
471 return (ushort)(object)
value;
473 if (typeof(TOther) == typeof(uint))
475 return (uint)(object)
value;
477 if (typeof(TOther) == typeof(ulong))
479 return (uint)(ulong)(
object)
value;
481 if (typeof(TOther) == typeof(
UIntPtr))
491 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
494 if (typeof(TOther) == typeof(
byte))
496 return (
byte)(object)
value;
498 if (typeof(TOther) == typeof(
char))
500 return (
char)(object)
value;
502 if (typeof(TOther) == typeof(decimal))
504 decimal num = (decimal)(
object)
value;
505 if (!(num > 4294967295m))
513 return uint.MaxValue;
515 if (typeof(TOther) == typeof(
double))
517 double num2 = (double)(
object)
value;
518 if (!(num2 > 4294967295.0))
526 return uint.MaxValue;
528 if (typeof(TOther) == typeof(
short))
537 if (typeof(TOther) == typeof(
int))
539 int num4 = (int)(
object)
value;
546 if (typeof(TOther) == typeof(
long))
548 long num5 = (long)(
object)
value;
549 if (num5 <= uint.MaxValue)
557 return uint.MaxValue;
559 if (typeof(TOther) == typeof(
IntPtr))
564 if ((nint)intPtr >= 0)
566 return (uint)(nint)intPtr;
572 if (typeof(TOther) == typeof(sbyte))
574 sbyte b = (sbyte)(
object)
value;
581 if (typeof(TOther) == typeof(
float))
583 float num6 = (float)(
object)
value;
584 if (!(num6 > 4.2949673
E+09f))
592 return uint.MaxValue;
594 if (typeof(TOther) == typeof(ushort))
596 return (ushort)(object)
value;
598 if (typeof(TOther) == typeof(uint))
600 return (uint)(object)
value;
602 if (typeof(TOther) == typeof(ulong))
604 ulong num7 = (ulong)(
object)
value;
605 if (num7 <= uint.MaxValue)
609 return uint.MaxValue;
611 if (typeof(TOther) == typeof(
UIntPtr))
614 if ((nuint)uIntPtr <= uint.
MaxValue)
616 return (uint)(nuint)uIntPtr;
625 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
628 if (typeof(TOther) == typeof(
byte))
630 return (
byte)(object)
value;
632 if (typeof(TOther) == typeof(
char))
634 return (
char)(object)
value;
636 if (typeof(TOther) == typeof(decimal))
638 return (uint)(decimal)(
object)
value;
640 if (typeof(TOther) == typeof(
double))
642 return (uint)(double)(
object)
value;
644 if (typeof(TOther) == typeof(
short))
648 if (typeof(TOther) == typeof(
int))
650 return (uint)(int)(
object)
value;
652 if (typeof(TOther) == typeof(
long))
654 return (uint)(long)(
object)
value;
656 if (typeof(TOther) == typeof(
IntPtr))
660 if (typeof(TOther) == typeof(sbyte))
662 return (uint)(sbyte)(
object)
value;
664 if (typeof(TOther) == typeof(
float))
666 return (uint)(float)(
object)
value;
668 if (typeof(TOther) == typeof(ushort))
670 return (ushort)(object)
value;
672 if (typeof(TOther) == typeof(uint))
674 return (uint)(object)
value;
676 if (typeof(TOther) == typeof(ulong))
678 return (uint)(ulong)(
object)
value;
680 if (typeof(TOther) == typeof(
UIntPtr))
688 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
694 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
700 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
706 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
709 return Parse(
s, style, provider);
712 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
715 return Parse(
s, style, provider);
718 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
729 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
732 if (typeof(TOther) == typeof(
byte))
734 result = (byte)(
object)
value;
737 if (typeof(TOther) == typeof(
char))
739 result = (char)(
object)
value;
742 if (typeof(TOther) == typeof(decimal))
744 decimal num = (decimal)(
object)
value;
745 if (num < 0m || num > 4294967295m)
753 if (typeof(TOther) == typeof(
double))
755 double num2 = (double)(
object)
value;
756 if (num2 < 0.0 || num2 > 4294967295.0)
764 if (typeof(TOther) == typeof(
short))
775 if (typeof(TOther) == typeof(
int))
777 int num4 = (int)(
object)
value;
786 if (typeof(TOther) == typeof(
long))
788 long num5 = (long)(
object)
value;
789 if (num5 < 0 || num5 > uint.MaxValue)
797 if (typeof(TOther) == typeof(
IntPtr))
800 if ((nint)intPtr < 0 || (nint)intPtr > uint.
MaxValue)
805 result = (uint)(nint)intPtr;
808 if (typeof(TOther) == typeof(sbyte))
810 sbyte b = (sbyte)(
object)
value;
819 if (typeof(TOther) == typeof(
float))
821 float num6 = (float)(
object)
value;
822 if (num6 < 0f || num6 > 4.2949673
E+09f)
830 if (typeof(TOther) == typeof(ushort))
832 result = (ushort)(
object)
value;
835 if (typeof(TOther) == typeof(uint))
837 result = (uint)(
object)
value;
840 if (typeof(TOther) == typeof(ulong))
842 ulong num7 = (ulong)(
object)
value;
843 if (num7 > uint.MaxValue)
851 if (typeof(TOther) == typeof(
UIntPtr))
859 result = (uint)(nuint)uIntPtr;
867 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
870 return TryParse(
s, style, provider, out result);
873 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
876 return TryParse(
s, style, provider, out result);
879 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
882 return Parse(
s, provider);
885 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
891 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
894 return value << shiftAmount;
897 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
900 return value >> shiftAmount;
903 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
909 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
915 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
921 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
927 [RequiresPreviewFeatures(
"Generic Math is in preview.", Url =
"https://aka.ms/dotnet-warnings/generic-math-preview")]
static decimal ToDecimal(object? value)
static long ToInt64(object? value)
static float ToSingle(object? value)
static int ToInt32(object? value)
static short ToInt16(object? value)
static byte ToByte(object? value)
static ulong ToUInt64(object? value)
static char ToChar(object? value)
static ushort ToUInt16(object? value)
static sbyte ToSByte(object? value)
static double ToDouble(object? value)
static bool ToBoolean([NotNullWhen(true)] object? value)
static object DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
static byte Clamp(byte value, byte min, byte max)
static byte Min(byte val1, byte val2)
static int DivRem(int a, int b, out int result)
static byte Max(byte val1, byte val2)
static ParsingStatus TryParseUInt32IntegerStyle(ReadOnlySpan< char > value, NumberStyles styles, NumberFormatInfo info, out uint result)
static string FormatUInt32(uint value, string format, IFormatProvider provider)
static uint ParseUInt32(ReadOnlySpan< char > value, NumberStyles styles, NumberFormatInfo info)
static bool TryFormatUInt32(uint value, ReadOnlySpan< char > format, IFormatProvider provider, Span< char > destination, out int charsWritten)
static ParsingStatus TryParseUInt32(ReadOnlySpan< char > value, NumberStyles styles, NumberFormatInfo info, out uint result)
static unsafe string UInt32ToDecStr(uint value)
static int TrailingZeroCount(int value)
static bool IsPow2(int value)
static int PopCount(uint value)
static int Log2(uint value)
static uint RotateRight(uint value, int offset)
static int LeadingZeroCount(uint value)
static uint RotateLeft(uint value, int offset)
static string Arg_MustBeUInt32
static string InvalidCast_FromTo
static string Format(string resourceFormat, object p1)
static void ThrowNotSupportedException(ExceptionResource resource)
static void ThrowArgumentNullException(string name)
static TResult AdditiveIdentity
static TSelf RotateRight(TSelf value, int rotateAmount)
static TSelf LeadingZeroCount(TSelf value)
static TSelf PopCount(TSelf value)
static TSelf TrailingZeroCount(TSelf value)
static TSelf RotateLeft(TSelf value, int rotateAmount)
static bool IsPow2(TSelf value)
static TSelf Log2(TSelf value)
short ToInt16(IFormatProvider? provider)
char ToChar(IFormatProvider? provider)
byte ToByte(IFormatProvider? provider)
decimal ToDecimal(IFormatProvider? provider)
object ToType(Type conversionType, IFormatProvider? provider)
uint ToUInt32(IFormatProvider? provider)
DateTime ToDateTime(IFormatProvider? provider)
int ToInt32(IFormatProvider? provider)
long ToInt64(IFormatProvider? provider)
ushort ToUInt16(IFormatProvider? provider)
double ToDouble(IFormatProvider? provider)
float ToSingle(IFormatProvider? provider)
sbyte ToSByte(IFormatProvider? provider)
ulong ToUInt64(IFormatProvider? provider)
bool ToBoolean(IFormatProvider? provider)
static TResult MultiplicativeIdentity
static TSelf Max(TSelf x, TSelf y)
static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out TSelf result)
static TSelf Parse(string s, NumberStyles style, IFormatProvider? provider)
static TSelf Sign(TSelf value)
static TSelf Min(TSelf x, TSelf y)
static TSelf Abs(TSelf value)
static TSelf Clamp(TSelf value, TSelf min, TSelf max)
static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out TSelf result)
static TSelf Parse(string s, IFormatProvider? provider)
static bool TryParse(ReadOnlySpan< char > s, IFormatProvider? provider, out TSelf result)
static TSelf Parse(ReadOnlySpan< char > s, IFormatProvider? provider)
static uint Parse(string s, NumberStyles style)
string ToString(IFormatProvider? provider)
static uint Parse(string s, NumberStyles style, IFormatProvider? provider)
static bool TryParse(ReadOnlySpan< char > s, out uint result)
override bool Equals([NotNullWhen(true)] object? obj)
override int GetHashCode()
static uint Parse(string s)
int CompareTo(object? value)
static bool TryParse([NotNullWhen(true)] string? s, out uint result)
override string ToString()
static uint uint Remainder INumber< uint >. DivRem(uint left, uint right)
static bool TryParse(ReadOnlySpan< char > s, NumberStyles style, IFormatProvider? provider, out uint result)
bool TryFormat(Span< char > destination, out int charsWritten, ReadOnlySpan< char > format=default(ReadOnlySpan< char >), IFormatProvider? provider=null)
string ToString(string? format)
static uint Parse(string s, IFormatProvider? provider)
int CompareTo(uint value)
static uint Parse(ReadOnlySpan< char > s, NumberStyles style=NumberStyles.Integer, IFormatProvider? provider=null)
string ToString(string? format, IFormatProvider? provider)
static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out uint result)