Int128 Struct

Definition

Represents a 128-bit signed integer.

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

Constructors

Int128(UInt64, UInt64)

Initializes a new instance of the Int128 struct.

Properties

MaxValue

Gets the maximum value of the current type.

MinValue

Gets the minimum value of the current type.

NegativeOne

Gets the value -1 for the type.

One

Gets the value 1 for the type.

Zero

Gets the value 0 for the type.

Methods

Abs(Int128)

Computes the absolute of a value.

Clamp(Int128, Int128, Int128)

Clamps a value to an inclusive minimum and maximum value.

CompareTo(Int128)

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(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.

CopySign(Int128, Int128)

Copies the sign of a value to the sign of another value.

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(Int128, Int128)

Computes the quotient and remainder of two values.

Equals(Int128)

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.

GetHashCode()

Serves as the default hash function.

IsEvenInteger(Int128)

Determines if a value represents an even integral number.

IsNegative(Int128)

Determines if a value is negative.

IsOddInteger(Int128)

Determines if a value represents an odd integral number.

IsPositive(Int128)

Determines if a value is positive.

IsPow2(Int128)

Determines if a value is a power of two.

LeadingZeroCount(Int128)

Computes the number of leading zeros in a value.

Log2(Int128)

Computes the log2 of a value.

Max(Int128, Int128)

Compares two values to compute which is greater.

MaxMagnitude(Int128, Int128)

Compares two values to compute which is greater.

Min(Int128, Int128)

Compares two values to compute which is lesser.

MinMagnitude(Int128, Int128)

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(Int128)

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

RotateLeft(Int128, Int32)

Rotates a value left by a given amount.

RotateRight(Int128, Int32)

Rotates a value right by a given amount.

Sign(Int128)

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(Int128)

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, Int128)

Tries to parse a string into a value.

TryParse(ReadOnlySpan<Char>, Int128)

Tries to parse a span of characters into a value.

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

Tries to parse a span of characters into a value.

TryParse(String, IFormatProvider, Int128)

Tries to parse a string into a value.

TryParse(String, Int128)

Tries to parse a string into a value.

TryParse(String, NumberStyles, IFormatProvider, Int128)

Tries to parse a string into a value.

Operators

Addition(Int128, Int128)

Adds two values together to compute their sum.

BitwiseAnd(Int128, Int128)

Computes the bitwise-and of two values.

BitwiseOr(Int128, Int128)

Computes the bitwise-or of two values.

CheckedAddition(Int128, Int128)

Adds two values together to compute their sum.

CheckedDecrement(Int128)

Decrements a value.

CheckedDivision(Int128, Int128)

Divides two values together to compute their quotient.

CheckedExplicit(Double)
CheckedExplicit(Int128)
CheckedExplicit(Single)
CheckedIncrement(Int128)

Increments a value.

CheckedMultiply(Int128, Int128)

Multiplies two values together to compute their product.

CheckedSubtraction(Int128, Int128)

Subtracts two values to compute their difference.

CheckedUnaryNegation(Int128)

Computes the unary negation of a value.

Decrement(Int128)

Decrements a value.

Division(Int128, Int128)

Divides two values together to compute their quotient.

Equality(Int128, Int128)

Compares two values to determine equality.

ExclusiveOr(Int128, Int128)

Computes the exclusive-or of two values.

Explicit(Decimal to Int128)

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

Explicit(Double to Int128)

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

Explicit(Int128 to Byte)

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

Explicit(Int128 to Char)

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

Explicit(Int128 to Decimal)

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

Explicit(Int128 to Double)

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

Explicit(Int128 to Half)

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

Explicit(Int128 to Int16)

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

Explicit(Int128 to Int32)

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

Explicit(Int128 to Int64)

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

Explicit(Int128 to IntPtr)

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

Explicit(Int128 to SByte)

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

Explicit(Int128 to Single)

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

Explicit(Int128 to UInt128)

Explicitly converts a 128-bit signed integer to a UInt128 value.

Explicit(Int128 to UInt16)

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

Explicit(Int128 to UInt32)

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

Explicit(Int128 to UInt64)

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

Explicit(Int128 to UIntPtr)

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

Explicit(Single to Int128)

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

GreaterThan(Int128, Int128)

Compares two values to determine which is greater.

GreaterThanOrEqual(Int128, Int128)

Compares two values to determine which is greater or equal.

Implicit(Byte to Int128)

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

Implicit(Char to Int128)

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

Implicit(Int16 to Int128)

Implicitly converts a Int16 value to a 128-bit signed integer.

Implicit(Int32 to Int128)

Implicitly converts a Int32 value to a 128-bit signed integer.

Implicit(Int64 to Int128)

Implicitly converts a Int64 value to a 128-bit signed integer.

Implicit(IntPtr to Int128)

Implicitly converts a IntPtr value to a 128-bit signed integer.

Implicit(SByte to Int128)

Implicitly converts a SByte value to a 128-bit signed integer.

Implicit(UInt16 to Int128)

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

Implicit(UInt32 to Int128)

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

Implicit(UInt64 to Int128)

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

Implicit(UIntPtr to Int128)

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

Increment(Int128)

Increments a value.

Inequality(Int128, Int128)

Compares two values to determine inequality.

LeftShift(Int128, Int32)

Shifts a value left by a given amount.

LessThan(Int128, Int128)

Compares two values to determine which is less.

LessThanOrEqual(Int128, Int128)

Compares two values to determine which is less or equal.

Modulus(Int128, Int128)

Divides two values together to compute their modulus or remainder.

Multiply(Int128, Int128)

Multiplies two values together to compute their product.

OnesComplement(Int128)

Computes the ones-complement representation of a given value.

RightShift(Int128, Int32)

Shifts a value right by a given amount.

Subtraction(Int128, Int128)

Subtracts two values to compute their difference.

UnaryNegation(Int128)

Computes the unary negation of a value.

UnaryPlus(Int128)

Computes the unary plus of a value.

UnsignedRightShift(Int128, Int32)

Shifts a value right by a given amount.

Explicit Interface Implementations

IBinaryInteger<Int128>.GetByteCount()

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

IBinaryInteger<Int128>.GetShortestBitLength()

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

IBinaryInteger<Int128>.TryWriteBigEndian(Span<Byte>, Int32)

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

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

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

Applies to