UInt128 Struct

Definition

Important

This API is not CLS-compliant.

Represents a 128-bit unsigned integer.

public value class UInt128 : IComparable<UInt128>, IEquatable<UInt128>, IParsable<UInt128>, ISpanParsable<UInt128>, System::Numerics::IAdditionOperators<UInt128, UInt128, UInt128>, System::Numerics::IAdditiveIdentity<UInt128, UInt128>, System::Numerics::IBinaryInteger<UInt128>, System::Numerics::IBinaryNumber<UInt128>, System::Numerics::IBitwiseOperators<UInt128, UInt128, UInt128>, System::Numerics::IComparisonOperators<UInt128, UInt128, bool>, System::Numerics::IDecrementOperators<UInt128>, System::Numerics::IDivisionOperators<UInt128, UInt128, UInt128>, System::Numerics::IEqualityOperators<UInt128, UInt128, bool>, System::Numerics::IIncrementOperators<UInt128>, System::Numerics::IMinMaxValue<UInt128>, System::Numerics::IModulusOperators<UInt128, UInt128, UInt128>, System::Numerics::IMultiplicativeIdentity<UInt128, UInt128>, System::Numerics::IMultiplyOperators<UInt128, UInt128, UInt128>, System::Numerics::INumber<UInt128>, System::Numerics::INumberBase<UInt128>, System::Numerics::IShiftOperators<UInt128, int, UInt128>, System::Numerics::ISubtractionOperators<UInt128, UInt128, UInt128>, System::Numerics::IUnaryNegationOperators<UInt128, UInt128>, System::Numerics::IUnaryPlusOperators<UInt128, UInt128>, System::Numerics::IUnsignedNumber<UInt128>
[System.CLSCompliant(false)]
public readonly struct UInt128 : IComparable<UInt128>, IEquatable<UInt128>, IParsable<UInt128>, ISpanParsable<UInt128>, System.Numerics.IAdditionOperators<UInt128,UInt128,UInt128>, System.Numerics.IAdditiveIdentity<UInt128,UInt128>, System.Numerics.IBinaryInteger<UInt128>, System.Numerics.IBinaryNumber<UInt128>, System.Numerics.IBitwiseOperators<UInt128,UInt128,UInt128>, System.Numerics.IComparisonOperators<UInt128,UInt128,bool>, System.Numerics.IDecrementOperators<UInt128>, System.Numerics.IDivisionOperators<UInt128,UInt128,UInt128>, System.Numerics.IEqualityOperators<UInt128,UInt128,bool>, System.Numerics.IIncrementOperators<UInt128>, System.Numerics.IMinMaxValue<UInt128>, System.Numerics.IModulusOperators<UInt128,UInt128,UInt128>, System.Numerics.IMultiplicativeIdentity<UInt128,UInt128>, System.Numerics.IMultiplyOperators<UInt128,UInt128,UInt128>, System.Numerics.INumber<UInt128>, System.Numerics.INumberBase<UInt128>, System.Numerics.IShiftOperators<UInt128,int,UInt128>, System.Numerics.ISubtractionOperators<UInt128,UInt128,UInt128>, System.Numerics.IUnaryNegationOperators<UInt128,UInt128>, System.Numerics.IUnaryPlusOperators<UInt128,UInt128>, System.Numerics.IUnsignedNumber<UInt128>
[<System.CLSCompliant(false)>]
type UInt128 = struct
    interface IFormattable
    interface IParsable<UInt128>
    interface ISpanFormattable
    interface ISpanParsable<UInt128>
    interface IAdditionOperators<UInt128, UInt128, UInt128>
    interface IAdditiveIdentity<UInt128, UInt128>
    interface IBinaryInteger<UInt128>
    interface IBinaryNumber<UInt128>
    interface IBitwiseOperators<UInt128, UInt128, UInt128>
    interface IComparisonOperators<UInt128, UInt128, bool>
    interface IEqualityOperators<UInt128, UInt128, bool>
    interface IDecrementOperators<UInt128>
    interface IDivisionOperators<UInt128, UInt128, UInt128>
    interface IIncrementOperators<UInt128>
    interface IModulusOperators<UInt128, UInt128, UInt128>
    interface IMultiplicativeIdentity<UInt128, UInt128>
    interface IMultiplyOperators<UInt128, UInt128, UInt128>
    interface INumber<UInt128>
    interface INumberBase<UInt128>
    interface ISubtractionOperators<UInt128, UInt128, UInt128>
    interface IUnaryNegationOperators<UInt128, UInt128>
    interface IUnaryPlusOperators<UInt128, UInt128>
    interface IShiftOperators<UInt128, int, UInt128>
    interface IMinMaxValue<UInt128>
    interface IUnsignedNumber<UInt128>
Public Structure UInt128
Implements IAdditionOperators(Of UInt128, UInt128, UInt128), IAdditiveIdentity(Of UInt128, UInt128), IBinaryInteger(Of UInt128), IBinaryNumber(Of UInt128), IBitwiseOperators(Of UInt128, UInt128, UInt128), IComparable(Of UInt128), IComparisonOperators(Of UInt128, UInt128, Boolean), IDecrementOperators(Of UInt128), IDivisionOperators(Of UInt128, UInt128, UInt128), IEqualityOperators(Of UInt128, UInt128, Boolean), IEquatable(Of UInt128), IIncrementOperators(Of UInt128), IMinMaxValue(Of UInt128), IModulusOperators(Of UInt128, UInt128, UInt128), IMultiplicativeIdentity(Of UInt128, UInt128), IMultiplyOperators(Of UInt128, UInt128, UInt128), INumber(Of UInt128), INumberBase(Of UInt128), IParsable(Of UInt128), IShiftOperators(Of UInt128, Integer, UInt128), ISpanParsable(Of UInt128), ISubtractionOperators(Of UInt128, UInt128, UInt128), IUnaryNegationOperators(Of UInt128, UInt128), IUnaryPlusOperators(Of UInt128, UInt128), IUnsignedNumber(Of UInt128)
Inheritance
UInt128
Attributes
Implements
IComparable IComparable<UInt128> IComparable<TSelf> IEquatable<UInt128> IEquatable<TSelf> IFormattable IParsable<UInt128> IParsable<TSelf> ISpanFormattable ISpanParsable<UInt128> ISpanParsable<TSelf> IAdditionOperators<UInt128,UInt128,UInt128> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<UInt128,UInt128> IAdditiveIdentity<TSelf,TSelf> IBinaryInteger<UInt128> IBinaryNumber<UInt128> IBinaryNumber<TSelf> IBitwiseOperators<UInt128,UInt128,UInt128> IBitwiseOperators<TSelf,TSelf,TSelf> IComparisonOperators<UInt128,UInt128,Boolean> IComparisonOperators<TSelf,TSelf,Boolean> IDecrementOperators<UInt128> IDecrementOperators<TSelf> IDivisionOperators<UInt128,UInt128,UInt128> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<UInt128,UInt128,Boolean> IEqualityOperators<TSelf,TOther,TResult> IEqualityOperators<TSelf,TSelf,Boolean> IIncrementOperators<UInt128> IIncrementOperators<TSelf> IMinMaxValue<UInt128> IModulusOperators<UInt128,UInt128,UInt128> IModulusOperators<TSelf,TSelf,TSelf> IMultiplicativeIdentity<UInt128,UInt128> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<UInt128,UInt128,UInt128> IMultiplyOperators<TSelf,TSelf,TSelf> INumber<UInt128> INumber<TSelf> INumberBase<UInt128> INumberBase<TSelf> IShiftOperators<UInt128,Int32,UInt128> IShiftOperators<TSelf,Int32,TSelf> ISubtractionOperators<UInt128,UInt128,UInt128> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<UInt128,UInt128> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<UInt128,UInt128> IUnaryPlusOperators<TSelf,TSelf> IUnsignedNumber<UInt128>

Constructors

UInt128(UInt64, UInt64)

Initializes a new instance of the UInt128 struct.

Properties

MaxValue

Gets the maximum value of the current type.

MinValue

Gets the minimum value of the current type.

One

Gets the value 1 for the type.

Zero

Gets the value 0 for the type.

Methods

Clamp(UInt128, UInt128, UInt128)

Clamps a value to an inclusive minimum and maximum value.

CompareTo(Object)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

CompareTo(UInt128)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

CreateChecked<TOther>(TOther)

Creates an instance of the current type from a value, throwing an overflow exception for any values that fall outside the representable range of the current type.

CreateSaturating<TOther>(TOther)

Creates an instance of the current type from a value, saturating any values that fall outside the representable range of the current type.

CreateTruncating<TOther>(TOther)

Creates an instance of the current type from a value, truncating any values that fall outside the representable range of the current type.

DivRem(UInt128, UInt128)

Computes the quotient and remainder of two values.

Equals(Object)

Determines whether the specified object is equal to the current object.

Equals(UInt128)

Indicates whether the current object is equal to another object of the same type.

GetHashCode()

Serves as the default hash function.

IsEvenInteger(UInt128)

Determines if a value represents an even integral number.

IsOddInteger(UInt128)

Determines if a value represents an odd integral number.

IsPow2(UInt128)

Determines if a value is a power of two.

LeadingZeroCount(UInt128)

Computes the number of leading zeros in a value.

Log2(UInt128)

Computes the log2 of a value.

Max(UInt128, UInt128)

Compares two values to compute which is greater.

Min(UInt128, UInt128)

Compares two values to compute which is lesser.

Parse(ReadOnlySpan<Char>, IFormatProvider)

Parses a span of characters into a value.

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

Parses a span of characters into a value.

Parse(String)

Parses a string into a value.

Parse(String, IFormatProvider)

Parses a string into a value.

Parse(String, NumberStyles)

Parses a string into a value.

Parse(String, NumberStyles, IFormatProvider)

Parses a string into a value.

PopCount(UInt128)

Computes the number of bits that are set in a value.

RotateLeft(UInt128, Int32)

Rotates a value left by a given amount.

RotateRight(UInt128, Int32)

Rotates a value right by a given amount.

Sign(UInt128)

Computes the sign of a value.

ToString()

Returns a string that represents the current object.

ToString(IFormatProvider)

Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.

ToString(String)

Converts the numeric value of this instance to its equivalent string representation, using the specified format.

ToString(String, IFormatProvider)

Formats the value of the current instance using the specified format.

TrailingZeroCount(UInt128)

Computes the number of trailing zeros in a value.

TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider)

Tries to format the value of the current instance into the provided span of characters.

TryParse(ReadOnlySpan<Char>, IFormatProvider, UInt128)

Tries to parse a string into a value.

TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, UInt128)

Tries to parse a span of characters into a value.

TryParse(ReadOnlySpan<Char>, UInt128)

Tries to parse a span of characters into a value.

TryParse(String, IFormatProvider, UInt128)

Tries to parse a string into a value.

TryParse(String, NumberStyles, IFormatProvider, UInt128)

Tries to parse a string into a value.

TryParse(String, UInt128)

Tries to parse a string into a value.

Operators

Addition(UInt128, UInt128)

Adds two values together to compute their sum.

BitwiseAnd(UInt128, UInt128)

Computes the bitwise-and of two values.

BitwiseOr(UInt128, UInt128)

Computes the bitwise-or of two values.

CheckedAddition(UInt128, UInt128)

Adds two values together to compute their sum.

CheckedDecrement(UInt128)

Decrements a value.

CheckedDivision(UInt128, UInt128)

Divides two values together to compute their quotient.

CheckedExplicit(Double)
CheckedExplicit(Int16)
CheckedExplicit(Int32)
CheckedExplicit(Int64)
CheckedExplicit(IntPtr)
CheckedExplicit(SByte)
CheckedExplicit(Single)
CheckedExplicit(UInt128)
CheckedIncrement(UInt128)

Increments a value.

CheckedMultiply(UInt128, UInt128)

Multiplies two values together to compute their product.

CheckedSubtraction(UInt128, UInt128)

Subtracts two values to compute their difference.

CheckedUnaryNegation(UInt128)

Computes the unary negation of a value.

Decrement(UInt128)

Decrements a value.

Division(UInt128, UInt128)

Divides two values together to compute their quotient.

Equality(UInt128, UInt128)

Compares two values to determine equality.

ExclusiveOr(UInt128, UInt128)

Computes the exclusive-or of two values.

Explicit(Decimal to UInt128)

Explicitly converts a Decimal value to a 128-bit unsigned integer.

Explicit(Double to UInt128)

Explicitly converts a Double value to a 128-bit unsigned integer.

Explicit(Int16 to UInt128)

Explicitly converts a Int16 value to a 128-bit unsigned integer.

Explicit(Int32 to UInt128)

Explicitly converts a Int32 value to a 128-bit unsigned integer.

Explicit(Int64 to UInt128)

Explicitly converts a Int64 value to a 128-bit unsigned integer.

Explicit(IntPtr to UInt128)

Explicitly converts a IntPtr value to a 128-bit unsigned integer.

Explicit(SByte to UInt128)

Explicitly converts a SByte value to a 128-bit unsigned integer.

Explicit(Single to UInt128)

Explicitly converts a Single value to a 128-bit unsigned integer.

Explicit(UInt128 to Byte)

Explicitly converts a 128-bit unsigned integer to a Byte value.

Explicit(UInt128 to Char)

Explicitly converts a 128-bit unsigned integer to a Char value.

Explicit(UInt128 to Decimal)

Explicitly converts a 128-bit unsigned integer to a Decimal value.

Explicit(UInt128 to Double)

Explicitly converts a 128-bit unsigned integer to a Double value.

Explicit(UInt128 to Half)

Explicitly converts a 128-bit unsigned integer to a Half value.

Explicit(UInt128 to Int128)

Explicitly converts a 128-bit unsigned integer to a Int128 value.

Explicit(UInt128 to Int16)

Explicitly converts a 128-bit unsigned integer to a Int16 value.

Explicit(UInt128 to Int32)

Explicitly converts a 128-bit unsigned integer to a Int32 value.

Explicit(UInt128 to Int64)

Explicitly converts a 128-bit unsigned integer to a Int64 value.

Explicit(UInt128 to IntPtr)

Explicitly converts a 128-bit unsigned integer to a IntPtr value.

Explicit(UInt128 to SByte)

Explicitly converts a 128-bit unsigned integer to a SByte value.

Explicit(UInt128 to Single)

Explicitly converts a 128-bit unsigned integer to a Single value.

Explicit(UInt128 to UInt16)

Explicitly converts a 128-bit unsigned integer to a UInt16 value.

Explicit(UInt128 to UInt32)

Explicitly converts a 128-bit unsigned integer to a UInt32 value.

Explicit(UInt128 to UInt64)

Explicitly converts a 128-bit unsigned integer to a UInt64 value.

Explicit(UInt128 to UIntPtr)

Explicitly converts a 128-bit unsigned integer to a UIntPtr value.

GreaterThan(UInt128, UInt128)

Compares two values to determine which is greater.

GreaterThanOrEqual(UInt128, UInt128)

Compares two values to determine which is greater or equal.

Implicit(Byte to UInt128)

Implicitly converts a Byte value to a 128-bit unsigned integer.

Implicit(Char to UInt128)

Implicitly converts a Char value to a 128-bit unsigned integer.

Implicit(UInt16 to UInt128)

Implicitly converts a UInt16 value to a 128-bit unsigned integer.

Implicit(UInt32 to UInt128)

Implicitly converts a UInt32 value to a 128-bit unsigned integer.

Implicit(UInt64 to UInt128)

Implicitly converts a UInt64 value to a 128-bit unsigned integer.

Implicit(UIntPtr to UInt128)

Implicitly converts a UIntPtr value to a 128-bit unsigned integer.

Increment(UInt128)

Increments a value.

Inequality(UInt128, UInt128)

Compares two values to determine inequality.

LeftShift(UInt128, Int32)

Shifts a value left by a given amount.

LessThan(UInt128, UInt128)

Compares two values to determine which is less.

LessThanOrEqual(UInt128, UInt128)

Compares two values to determine which is less or equal.

Modulus(UInt128, UInt128)

Divides two values together to compute their modulus or remainder.

Multiply(UInt128, UInt128)

Multiplies two values together to compute their product.

OnesComplement(UInt128)

Computes the ones-complement representation of a given value.

RightShift(UInt128, Int32)

Shifts a value right by a given amount.

Subtraction(UInt128, UInt128)

Subtracts two values to compute their difference.

UnaryNegation(UInt128)

Computes the unary negation of a value.

UnaryPlus(UInt128)

Computes the unary plus of a value.

UnsignedRightShift(UInt128, Int32)

Shifts a value right by a given amount.

Explicit Interface Implementations

IAdditiveIdentity<UInt128,UInt128>.AdditiveIdentity
IBinaryInteger<UInt128>.GetByteCount()

Gets the number of bytes that will be written as part of TryWriteLittleEndian(Span<Byte>, Int32).

IBinaryInteger<UInt128>.GetShortestBitLength()

Gets the length, in bits, of the shortest two's complement representation of the current value.

IBinaryInteger<UInt128>.TryReadBigEndian(ReadOnlySpan<Byte>, Boolean, UInt128)
IBinaryInteger<UInt128>.TryReadLittleEndian(ReadOnlySpan<Byte>, Boolean, UInt128)
IBinaryInteger<UInt128>.TryWriteBigEndian(Span<Byte>, Int32)

Tries to write the current value, in big-endian format, to a given span.

IBinaryInteger<UInt128>.TryWriteLittleEndian(Span<Byte>, Int32)

Tries to write the current value, in little-endian format, to a given span.

IBinaryNumber<UInt128>.AllBitsSet
IMultiplicativeIdentity<UInt128,UInt128>.MultiplicativeIdentity
INumber<UInt128>.CopySign(UInt128, UInt128)
INumber<UInt128>.MaxNumber(UInt128, UInt128)
INumber<UInt128>.MinNumber(UInt128, UInt128)
INumberBase<UInt128>.Abs(UInt128)
INumberBase<UInt128>.IsCanonical(UInt128)
INumberBase<UInt128>.IsComplexNumber(UInt128)
INumberBase<UInt128>.IsFinite(UInt128)
INumberBase<UInt128>.IsImaginaryNumber(UInt128)
INumberBase<UInt128>.IsInfinity(UInt128)
INumberBase<UInt128>.IsInteger(UInt128)
INumberBase<UInt128>.IsNaN(UInt128)
INumberBase<UInt128>.IsNegative(UInt128)
INumberBase<UInt128>.IsNegativeInfinity(UInt128)
INumberBase<UInt128>.IsNormal(UInt128)
INumberBase<UInt128>.IsPositive(UInt128)
INumberBase<UInt128>.IsPositiveInfinity(UInt128)
INumberBase<UInt128>.IsRealNumber(UInt128)
INumberBase<UInt128>.IsSubnormal(UInt128)
INumberBase<UInt128>.IsZero(UInt128)
INumberBase<UInt128>.MaxMagnitude(UInt128, UInt128)
INumberBase<UInt128>.MaxMagnitudeNumber(UInt128, UInt128)
INumberBase<UInt128>.MinMagnitude(UInt128, UInt128)
INumberBase<UInt128>.MinMagnitudeNumber(UInt128, UInt128)
INumberBase<UInt128>.Radix
INumberBase<UInt128>.TryConvertFromChecked<TOther>(TOther, UInt128)
INumberBase<UInt128>.TryConvertFromSaturating<TOther>(TOther, UInt128)
INumberBase<UInt128>.TryConvertFromTruncating<TOther>(TOther, UInt128)
INumberBase<UInt128>.TryConvertToChecked<TOther>(UInt128, TOther)
INumberBase<UInt128>.TryConvertToSaturating<TOther>(UInt128, TOther)
INumberBase<UInt128>.TryConvertToTruncating<TOther>(UInt128, TOther)

Applies to