Skip to content

UInt24 Struct

Definition

Represents a 24-bit unsigned integer.

public sealed struct UInt24 : IBinaryInteger<UInt24>, IBinaryNumber<UInt24>, IBitwiseOperators<UInt24, UInt24, UInt24>, INumber<UInt24>, IComparable, IComparable<UInt24>, IComparisonOperators<UInt24, UInt24, Boolean>, IEqualityOperators<UInt24, UInt24, Boolean>, IModulusOperators<UInt24, UInt24, UInt24>, INumberBase<UInt24>, IAdditionOperators<UInt24, UInt24, UInt24>, IAdditiveIdentity<UInt24, UInt24>, IDecrementOperators<UInt24>, IDivisionOperators<UInt24, UInt24, UInt24>, IEquatable<UInt24>, IIncrementOperators<UInt24>, IMultiplicativeIdentity<UInt24, UInt24>, IMultiplyOperators<UInt24, UInt24, UInt24>, ISpanFormattable, IFormattable, ISpanParsable<UInt24>, IParsable<UInt24>, ISubtractionOperators<UInt24, UInt24, UInt24>, IUnaryPlusOperators<UInt24, UInt24>, IUnaryNegationOperators<UInt24, UInt24>, IUtf8SpanFormattable, IUtf8SpanParsable<UInt24>, IShiftOperators<UInt24, Int32, UInt24>, IMinMaxValue<UInt24>, IUnsignedNumber<UInt24>

View source

Properties

Name Description
AdditiveIdentity Gets the additive identity for a UInt24, which is 0.
MaxValue Represents the largest possible value of a UInt24.
MinValue Represents the smallest possible value of a UInt24.
MultiplicativeIdentity Gets the multiplicative identity for a UInt24, which is 1.
One Represents the value 1 for a UInt24.
Radix Gets the radix, or base, for the type. For binary integers this is always 2.
Zero Represents the value 0 for a UInt24.

Methods

Name Description
Abs(UInt24) Computes the absolute of a value.
Clamp(UInt24, UInt24, UInt24) 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(UInt24) 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)
CreateSaturating<TOther>(TOther)
CreateTruncating<TOther>(TOther)
Equals(UInt24) Indicates whether the current object is equal to another object of the same type.
Equals(Object) Determines whether the specified object is equal to the current object.
GetByteCount() Gets the number of bytes that will be written as part of TryWriteLittleEndian(Span<Byte>, Int32).
GetHashCode() Serves as the default hash function.
GetShortestBitLength() Gets the length, in bits, of the shortest two's complement representation of the current value.
IsCanonical(UInt24) Determines if a value is in its canonical representation.
IsComplexNumber(UInt24) Determines if a value represents a complex number.
IsEvenInteger(UInt24) Determines if a value represents an even integral number.
IsFinite(UInt24) Determines if a value is finite.
IsImaginaryNumber(UInt24) Determines if a value represents a pure imaginary number.
IsInfinity(UInt24) Determines if a value is infinite.
IsInteger(UInt24) Determines if a value represents an integral number.
IsNaN(UInt24) Determines if a value is NaN.
IsNegative(UInt24) Determines if a value represents a negative real number.
IsNegativeInfinity(UInt24) Determines if a value is negative infinity.
IsNormal(UInt24) Determines if a value is normal.
IsOddInteger(UInt24) Determines if a value represents an odd integral number.
IsPositive(UInt24) Determines if a value represents zero or a positive real number.
IsPositiveInfinity(UInt24) Determines if a value is positive infinity.
IsPow2(UInt24) Determines if a value is a power of two.
IsRealNumber(UInt24) Determines if a value represents a real number.
IsSubnormal(UInt24) Determines if a value is subnormal.
IsZero(UInt24) Determines if a value is zero.
LeadingZeroCount(UInt24) Computes the number of leading zero bits in a value.
Log2(UInt24) Computes the log2 of a value.
Max(UInt24, UInt24) Compares two values to compute which is greater.
MaxMagnitude(UInt24, UInt24) Compares two values to compute which has the greater magnitude.
MaxMagnitudeNumber(UInt24, UInt24) Compares two values to compute which has the greater magnitude and returning the other value if an input is NaN.
Min(UInt24, UInt24) Compares two values to compute which is lesser.
MinMagnitude(UInt24, UInt24) Compares two values to compute which has the lesser magnitude.
MinMagnitudeNumber(UInt24, UInt24) Compares two values to compute which has the lesser magnitude and returning the other value if an input is NaN.
Parse(String, IFormatProvider) Parses a string into a value.
Parse(String, NumberStyles, IFormatProvider) Parses a string into a value.
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(ReadOnlySpan<Byte>, IFormatProvider) Parses a span of UTF-8 characters into a value.
Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider) Parses a span of UTF-8 characters into a value.
PopCount(UInt24) Computes the number of bits that are set in a value.
RotateLeft(UInt24, Int32) Rotates a value left by a given amount.
RotateRight(UInt24, Int32) Rotates a value right by a given amount.
Sign(UInt24) Computes the sign of a value.
ToString() Returns a string that represents the current object.
ToString(String, IFormatProvider) Formats the value of the current instance using the specified format.
TrailingZeroCount(UInt24) Computes the number of trailing zero bits 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.
TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) Tries to format the value of the current instance as UTF-8 into the provided span of bytes.
TryParse(String, IFormatProvider, UInt24) Tries to parse a string into a value.
TryParse(String, NumberStyles, IFormatProvider, UInt24) Tries to parse a string into a value.
TryParse(ReadOnlySpan<Char>, IFormatProvider, UInt24) Tries to parse a span of characters into a value.
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, UInt24) Tries to parse a span of characters into a value.
TryParse(ReadOnlySpan<Byte>, IFormatProvider, UInt24) Tries to parse a span of UTF-8 characters into a value.
TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, UInt24) Tries to parse a span of UTF-8 characters into a value.
TryWriteBigEndian(Span<Byte>, Int32) Tries to write the current value, in big-endian format, to a given span.
TryWriteLittleEndian(Span<Byte>, Int32) Tries to write the current value, in little-endian format, to a given span.

Operators

Name Description
op_Addition(UInt24, UInt24) Adds two values together to compute their sum.
op_BitwiseAnd(UInt24, UInt24) Computes the bitwise-and of two values.
op_BitwiseOr(UInt24, UInt24) Computes the bitwise-or of two values.
op_CheckedAddition(UInt24, UInt24) Adds two values together to compute their sum.
op_CheckedDecrement(UInt24) Decrements a value.
op_CheckedDivision(UInt24, UInt24) Divides two values together to compute their quotient.
op_CheckedIncrement(UInt24) Increments a value.
op_CheckedMultiply(UInt24, UInt24) Multiplies two values together to compute their product.
op_CheckedSubtraction(UInt24, UInt24) Subtracts two values to compute their difference.
op_CheckedUnaryNegation(UInt24) Computes the checked unary negation of a value.
op_Decrement(UInt24) Decrements a value.
op_Division(UInt24, UInt24) Divides one value by another to compute their quotient.
op_Equality(UInt24, UInt24) Compares two values to determine equality.
op_ExclusiveOr(UInt24, UInt24) Computes the exclusive-or of two values.
op_GreaterThan(UInt24, UInt24) Compares two values to determine which is greater.
op_GreaterThanOrEqual(UInt24, UInt24) Compares two values to determine which is greater or equal.
op_Increment(UInt24) Increments a value.
op_Inequality(UInt24, UInt24) Compares two values to determine inequality.
op_LeftShift(UInt24, Int32) Shifts a value left by a given amount.
op_LessThan(UInt24, UInt24) Compares two values to determine which is less.
op_LessThanOrEqual(UInt24, UInt24) Compares two values to determine which is less or equal.
op_Modulus(UInt24, UInt24) Divides two values together to compute their modulus or remainder.
op_Multiply(UInt24, UInt24) Multiplies two values together to compute their product.
op_OnesComplement(UInt24) Computes the ones-complement representation of a given value.
op_Explicit(SByte) Explicitly converts an SByte to a UInt24.
op_Explicit(Int16) Explicitly converts a Int16 to a UInt24.
op_Explicit(Int32) Explicitly converts an Int32 to a UInt24.
op_Explicit(UInt32) Explicitly converts a UInt32 to a UInt24.
op_Explicit(Int64) Explicitly converts a Int64 to a UInt24.
op_Explicit(UInt64) Explicitly converts a UInt64 to a UInt24.
op_Explicit(IntPtr) Explicitly converts a IntPtr to a UInt24.
op_Explicit(UIntPtr) Explicitly converts a UIntPtr to a UInt24.
op_Explicit(Half) Explicitly converts a Half to a UInt24.
op_Explicit(Single) Explicitly converts a Single to a UInt24.
op_Explicit(Double) Explicitly converts a Double to a UInt24.
op_Explicit(Decimal) Explicitly converts a Decimal to a UInt24.
op_Explicit(UInt24) Explicitly converts a UInt24 to a Byte.
op_Explicit(UInt24) Explicitly converts a UInt24 to an SByte.
op_Explicit(UInt24) Explicitly converts a UInt24 to a Int16.
op_Explicit(UInt24) Explicitly converts a UInt24 to a UInt16.
op_Implicit(Byte) Implicitly converts a Byte to a UInt24.
op_Implicit(UInt16) Implicitly converts a UInt16 to a UInt24.
op_Implicit(UInt24) Implicitly converts a UInt24 to a UInt32.
op_Implicit(UInt24) Implicitly converts a UInt24 to an Int32.
op_Implicit(UInt24) Implicitly converts a UInt24 to a Int64.
op_Implicit(UInt24) Implicitly converts a UInt24 to a UInt64.
op_RightShift(UInt24, Int32) Shifts a value right by a given amount.
op_Subtraction(UInt24, UInt24) Subtracts two values to compute their difference.
op_UnaryNegation(UInt24) Computes the unary negation of a value.
op_UnaryPlus(UInt24) Computes the unary plus of a value.
op_UnsignedRightShift(UInt24, Int32) Shifts a value right by a given amount.