Search notes:

.NET: Integral numeric types

List of integral numeric types

.NET Type C# keyword PowerShell literal suffix
System.SByte, System.Byte sbyte, byte y, uy
System.Int16, System.UInt16 short, ushort s, us
System.Int32, System.UInt32 int, uint u (none for System.UInt32???)
System.Int64, System.UInt64 long, ulong l, ul
System.IntPtr, System.UIntPtr nint, nuint

Parse

Convert a hexadecimal string into an integral numeric type, for examle in PowerShell:
[Uint32]::Parse('abcd', [System.Globalization.NumberStyles]::AllowHexSpecifier)
See also System.Convert.FromHexString

Converting to integral numeric types

System.Convert provides a few To…() methods that allow to convert to integral types, as is demonstrated with the following PowerShell statements:
[System.Convert]::ToUInt64('   42 ')
[System.Convert]::ToUInt64('fedcba9876543210', 16) # Hexadecimal to Uint64

See also

System.Numerics.BigInteger
System.Decimal

Index