UInt64 Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Important
This API is not CLS-compliant.
Represents a 64-bit unsigned integer.
public value class System::UInt64 : IComparable, IComparable<System::UInt64>, IConvertible, IEquatable<System::UInt64>, IFormattable
public value class System::UInt64 : IComparable, IComparable<System::UInt64>, IConvertible, IEquatable<System::UInt64>, ISpanFormattable
public value class System::UInt64 : IComparable<System::UInt64>, IConvertible, IEquatable<System::UInt64>, IParsable<System::UInt64>, ISpanParsable<System::UInt64>, System::Numerics::IAdditionOperators<System::UInt64, System::UInt64, System::UInt64>, System::Numerics::IAdditiveIdentity<System::UInt64, System::UInt64>, System::Numerics::IBinaryInteger<System::UInt64>, System::Numerics::IBinaryNumber<System::UInt64>, System::Numerics::IBitwiseOperators<System::UInt64, System::UInt64, System::UInt64>, System::Numerics::IComparisonOperators<System::UInt64, System::UInt64, bool>, System::Numerics::IDecrementOperators<System::UInt64>, System::Numerics::IDivisionOperators<System::UInt64, System::UInt64, System::UInt64>, System::Numerics::IEqualityOperators<System::UInt64, System::UInt64, bool>, System::Numerics::IIncrementOperators<System::UInt64>, System::Numerics::IMinMaxValue<System::UInt64>, System::Numerics::IModulusOperators<System::UInt64, System::UInt64, System::UInt64>, System::Numerics::IMultiplicativeIdentity<System::UInt64, System::UInt64>, System::Numerics::IMultiplyOperators<System::UInt64, System::UInt64, System::UInt64>, System::Numerics::INumber<System::UInt64>, System::Numerics::INumberBase<System::UInt64>, System::Numerics::IShiftOperators<System::UInt64, int, System::UInt64>, System::Numerics::ISubtractionOperators<System::UInt64, System::UInt64, System::UInt64>, System::Numerics::IUnaryNegationOperators<System::UInt64, System::UInt64>, System::Numerics::IUnaryPlusOperators<System::UInt64, System::UInt64>, System::Numerics::IUnsignedNumber<System::UInt64>
public value class System::UInt64 : IComparable<System::UInt64>, IConvertible, IEquatable<System::UInt64>, IParsable<System::UInt64>, ISpanParsable<System::UInt64>, IUtf8SpanParsable<System::UInt64>, System::Numerics::IAdditionOperators<System::UInt64, System::UInt64, System::UInt64>, System::Numerics::IAdditiveIdentity<System::UInt64, System::UInt64>, System::Numerics::IBinaryInteger<System::UInt64>, System::Numerics::IBinaryNumber<System::UInt64>, System::Numerics::IBitwiseOperators<System::UInt64, System::UInt64, System::UInt64>, System::Numerics::IComparisonOperators<System::UInt64, System::UInt64, bool>, System::Numerics::IDecrementOperators<System::UInt64>, System::Numerics::IDivisionOperators<System::UInt64, System::UInt64, System::UInt64>, System::Numerics::IEqualityOperators<System::UInt64, System::UInt64, bool>, System::Numerics::IIncrementOperators<System::UInt64>, System::Numerics::IMinMaxValue<System::UInt64>, System::Numerics::IModulusOperators<System::UInt64, System::UInt64, System::UInt64>, System::Numerics::IMultiplicativeIdentity<System::UInt64, System::UInt64>, System::Numerics::IMultiplyOperators<System::UInt64, System::UInt64, System::UInt64>, System::Numerics::INumber<System::UInt64>, System::Numerics::INumberBase<System::UInt64>, System::Numerics::IShiftOperators<System::UInt64, int, System::UInt64>, System::Numerics::ISubtractionOperators<System::UInt64, System::UInt64, System::UInt64>, System::Numerics::IUnaryNegationOperators<System::UInt64, System::UInt64>, System::Numerics::IUnaryPlusOperators<System::UInt64, System::UInt64>, System::Numerics::IUnsignedNumber<System::UInt64>
public value class System::UInt64 : IComparable, IConvertible, IFormattable
public value class System::UInt64 : IComparable, IComparable<System::UInt64>, IEquatable<System::UInt64>, IFormattable
[System.CLSCompliant(false)]
public struct UInt64 : IComparable, IComparable<ulong>, IConvertible, IEquatable<ulong>, IFormattable
[System.CLSCompliant(false)]
public readonly struct UInt64 : IComparable, IComparable<ulong>, IConvertible, IEquatable<ulong>, IFormattable
[System.CLSCompliant(false)]
public readonly struct UInt64 : IComparable, IComparable<ulong>, IConvertible, IEquatable<ulong>, ISpanFormattable
[System.CLSCompliant(false)]
public readonly struct UInt64 : IComparable<ulong>, IConvertible, IEquatable<ulong>, IParsable<ulong>, ISpanParsable<ulong>, System.Numerics.IAdditionOperators<ulong,ulong,ulong>, System.Numerics.IAdditiveIdentity<ulong,ulong>, System.Numerics.IBinaryInteger<ulong>, System.Numerics.IBinaryNumber<ulong>, System.Numerics.IBitwiseOperators<ulong,ulong,ulong>, System.Numerics.IComparisonOperators<ulong,ulong,bool>, System.Numerics.IDecrementOperators<ulong>, System.Numerics.IDivisionOperators<ulong,ulong,ulong>, System.Numerics.IEqualityOperators<ulong,ulong,bool>, System.Numerics.IIncrementOperators<ulong>, System.Numerics.IMinMaxValue<ulong>, System.Numerics.IModulusOperators<ulong,ulong,ulong>, System.Numerics.IMultiplicativeIdentity<ulong,ulong>, System.Numerics.IMultiplyOperators<ulong,ulong,ulong>, System.Numerics.INumber<ulong>, System.Numerics.INumberBase<ulong>, System.Numerics.IShiftOperators<ulong,int,ulong>, System.Numerics.ISubtractionOperators<ulong,ulong,ulong>, System.Numerics.IUnaryNegationOperators<ulong,ulong>, System.Numerics.IUnaryPlusOperators<ulong,ulong>, System.Numerics.IUnsignedNumber<ulong>
[System.CLSCompliant(false)]
public readonly struct UInt64 : IComparable<ulong>, IConvertible, IEquatable<ulong>, IParsable<ulong>, ISpanParsable<ulong>, IUtf8SpanParsable<ulong>, System.Numerics.IAdditionOperators<ulong,ulong,ulong>, System.Numerics.IAdditiveIdentity<ulong,ulong>, System.Numerics.IBinaryInteger<ulong>, System.Numerics.IBinaryNumber<ulong>, System.Numerics.IBitwiseOperators<ulong,ulong,ulong>, System.Numerics.IComparisonOperators<ulong,ulong,bool>, System.Numerics.IDecrementOperators<ulong>, System.Numerics.IDivisionOperators<ulong,ulong,ulong>, System.Numerics.IEqualityOperators<ulong,ulong,bool>, System.Numerics.IIncrementOperators<ulong>, System.Numerics.IMinMaxValue<ulong>, System.Numerics.IModulusOperators<ulong,ulong,ulong>, System.Numerics.IMultiplicativeIdentity<ulong,ulong>, System.Numerics.IMultiplyOperators<ulong,ulong,ulong>, System.Numerics.INumber<ulong>, System.Numerics.INumberBase<ulong>, System.Numerics.IShiftOperators<ulong,int,ulong>, System.Numerics.ISubtractionOperators<ulong,ulong,ulong>, System.Numerics.IUnaryNegationOperators<ulong,ulong>, System.Numerics.IUnaryPlusOperators<ulong,ulong>, System.Numerics.IUnsignedNumber<ulong>
[System.CLSCompliant(false)]
[System.Serializable]
public struct UInt64 : IComparable, IConvertible, IFormattable
[System.CLSCompliant(false)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct UInt64 : IComparable, IComparable<ulong>, IConvertible, IEquatable<ulong>, IFormattable
[System.CLSCompliant(false)]
public struct UInt64 : IComparable, IComparable<ulong>, IEquatable<ulong>, IFormattable
[<System.CLSCompliant(false)>]
type uint64 = struct
interface IConvertible
interface IFormattable
[<System.CLSCompliant(false)>]
type uint64 = struct
interface IConvertible
interface ISpanFormattable
interface IFormattable
[<System.CLSCompliant(false)>]
type uint64 = struct
interface IConvertible
interface IFormattable
interface IParsable<uint64>
interface ISpanFormattable
interface ISpanParsable<uint64>
interface IAdditionOperators<uint64, uint64, uint64>
interface IAdditiveIdentity<uint64, uint64>
interface IBinaryInteger<uint64>
interface IBinaryNumber<uint64>
interface IBitwiseOperators<uint64, uint64, uint64>
interface IComparisonOperators<uint64, uint64, bool>
interface IEqualityOperators<uint64, uint64, bool>
interface IDecrementOperators<uint64>
interface IDivisionOperators<uint64, uint64, uint64>
interface IIncrementOperators<uint64>
interface IModulusOperators<uint64, uint64, uint64>
interface IMultiplicativeIdentity<uint64, uint64>
interface IMultiplyOperators<uint64, uint64, uint64>
interface INumber<uint64>
interface INumberBase<uint64>
interface ISubtractionOperators<uint64, uint64, uint64>
interface IUnaryNegationOperators<uint64, uint64>
interface IUnaryPlusOperators<uint64, uint64>
interface IShiftOperators<uint64, int, uint64>
interface IMinMaxValue<uint64>
interface IUnsignedNumber<uint64>
[<System.CLSCompliant(false)>]
type uint64 = struct
interface IConvertible
interface IFormattable
interface IParsable<uint64>
interface ISpanFormattable
interface ISpanParsable<uint64>
interface IAdditionOperators<uint64, uint64, uint64>
interface IAdditiveIdentity<uint64, uint64>
interface IBinaryInteger<uint64>
interface IBinaryNumber<uint64>
interface IBitwiseOperators<uint64, uint64, uint64>
interface IComparisonOperators<uint64, uint64, bool>
interface IEqualityOperators<uint64, uint64, bool>
interface IDecrementOperators<uint64>
interface IDivisionOperators<uint64, uint64, uint64>
interface IIncrementOperators<uint64>
interface IModulusOperators<uint64, uint64, uint64>
interface IMultiplicativeIdentity<uint64, uint64>
interface IMultiplyOperators<uint64, uint64, uint64>
interface INumber<uint64>
interface INumberBase<uint64>
interface ISubtractionOperators<uint64, uint64, uint64>
interface IUnaryNegationOperators<uint64, uint64>
interface IUnaryPlusOperators<uint64, uint64>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<uint64>
interface IShiftOperators<uint64, int, uint64>
interface IMinMaxValue<uint64>
interface IUnsignedNumber<uint64>
[<System.CLSCompliant(false)>]
type uint64 = struct
interface IConvertible
interface IFormattable
interface IParsable<uint64>
interface ISpanFormattable
interface ISpanParsable<uint64>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<uint64>
interface IAdditionOperators<uint64, uint64, uint64>
interface IAdditiveIdentity<uint64, uint64>
interface IBinaryInteger<uint64>
interface IBinaryNumber<uint64>
interface IBitwiseOperators<uint64, uint64, uint64>
interface IComparisonOperators<uint64, uint64, bool>
interface IEqualityOperators<uint64, uint64, bool>
interface IDecrementOperators<uint64>
interface IDivisionOperators<uint64, uint64, uint64>
interface IIncrementOperators<uint64>
interface IModulusOperators<uint64, uint64, uint64>
interface IMultiplicativeIdentity<uint64, uint64>
interface IMultiplyOperators<uint64, uint64, uint64>
interface INumber<uint64>
interface INumberBase<uint64>
interface ISubtractionOperators<uint64, uint64, uint64>
interface IUnaryNegationOperators<uint64, uint64>
interface IUnaryPlusOperators<uint64, uint64>
interface IShiftOperators<uint64, int, uint64>
interface IMinMaxValue<uint64>
interface IUnsignedNumber<uint64>
[<System.CLSCompliant(false)>]
[<System.Serializable>]
type uint64 = struct
interface IFormattable
interface IConvertible
[<System.CLSCompliant(false)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type uint64 = struct
interface IFormattable
interface IConvertible
[<System.CLSCompliant(false)>]
type uint64 = struct
interface IFormattable
Public Structure UInt64
Implements IComparable, IComparable(Of ULong), IConvertible, IEquatable(Of ULong), IFormattable
Public Structure UInt64
Implements IComparable, IComparable(Of ULong), IConvertible, IEquatable(Of ULong), ISpanFormattable
Public Structure UInt64
Implements IAdditionOperators(Of ULong, ULong, ULong), IAdditiveIdentity(Of ULong, ULong), IBinaryInteger(Of ULong), IBinaryNumber(Of ULong), IBitwiseOperators(Of ULong, ULong, ULong), IComparable(Of ULong), IComparisonOperators(Of ULong, ULong, Boolean), IConvertible, IDecrementOperators(Of ULong), IDivisionOperators(Of ULong, ULong, ULong), IEqualityOperators(Of ULong, ULong, Boolean), IEquatable(Of ULong), IIncrementOperators(Of ULong), IMinMaxValue(Of ULong), IModulusOperators(Of ULong, ULong, ULong), IMultiplicativeIdentity(Of ULong, ULong), IMultiplyOperators(Of ULong, ULong, ULong), INumber(Of ULong), INumberBase(Of ULong), IParsable(Of ULong), IShiftOperators(Of ULong, Integer, ULong), ISpanParsable(Of ULong), ISubtractionOperators(Of ULong, ULong, ULong), IUnaryNegationOperators(Of ULong, ULong), IUnaryPlusOperators(Of ULong, ULong), IUnsignedNumber(Of ULong)
Public Structure UInt64
Implements IAdditionOperators(Of ULong, ULong, ULong), IAdditiveIdentity(Of ULong, ULong), IBinaryInteger(Of ULong), IBinaryNumber(Of ULong), IBitwiseOperators(Of ULong, ULong, ULong), IComparable(Of ULong), IComparisonOperators(Of ULong, ULong, Boolean), IConvertible, IDecrementOperators(Of ULong), IDivisionOperators(Of ULong, ULong, ULong), IEqualityOperators(Of ULong, ULong, Boolean), IEquatable(Of ULong), IIncrementOperators(Of ULong), IMinMaxValue(Of ULong), IModulusOperators(Of ULong, ULong, ULong), IMultiplicativeIdentity(Of ULong, ULong), IMultiplyOperators(Of ULong, ULong, ULong), INumber(Of ULong), INumberBase(Of ULong), IParsable(Of ULong), IShiftOperators(Of ULong, Integer, ULong), ISpanParsable(Of ULong), ISubtractionOperators(Of ULong, ULong, ULong), IUnaryNegationOperators(Of ULong, ULong), IUnaryPlusOperators(Of ULong, ULong), IUnsignedNumber(Of ULong), IUtf8SpanParsable(Of ULong)
Public Structure UInt64
Implements IComparable, IConvertible, IFormattable
Public Structure UInt64
Implements IComparable, IComparable(Of ULong), IEquatable(Of ULong), IFormattable
- Inheritance
- Attributes
- Implements
-
IComparable IComparable<UInt64> IConvertible IEquatable<UInt64> IFormattable ISpanFormattable IComparable<TSelf> IEquatable<TSelf> IParsable<UInt64> IParsable<TSelf> ISpanParsable<UInt64> ISpanParsable<TSelf> IAdditionOperators<UInt64,UInt64,UInt64> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<UInt64,UInt64> IAdditiveIdentity<TSelf,TSelf> IBinaryInteger<UInt64> IBinaryNumber<UInt64> IBinaryNumber<TSelf> IBitwiseOperators<UInt64,UInt64,UInt64> IBitwiseOperators<TSelf,TSelf,TSelf> IComparisonOperators<UInt64,UInt64,Boolean> IComparisonOperators<TSelf,TSelf,Boolean> IDecrementOperators<UInt64> IDecrementOperators<TSelf> IDivisionOperators<UInt64,UInt64,UInt64> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<UInt64,UInt64,Boolean> IEqualityOperators<TSelf,TOther,TResult> IEqualityOperators<TSelf,TSelf,Boolean> IIncrementOperators<UInt64> IIncrementOperators<TSelf> IMinMaxValue<UInt64> IModulusOperators<UInt64,UInt64,UInt64> IModulusOperators<TSelf,TSelf,TSelf> IMultiplicativeIdentity<UInt64,UInt64> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<UInt64,UInt64,UInt64> IMultiplyOperators<TSelf,TSelf,TSelf> INumber<UInt64> INumber<TSelf> INumberBase<UInt64> INumberBase<TSelf> IShiftOperators<UInt64,Int32,UInt64> IShiftOperators<TSelf,Int32,TSelf> ISubtractionOperators<UInt64,UInt64,UInt64> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<UInt64,UInt64> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<UInt64,UInt64> IUnaryPlusOperators<TSelf,TSelf> IUnsignedNumber<UInt64> IUtf8SpanFormattable IUtf8SpanParsable<UInt64> IUtf8SpanParsable<TSelf>
Remarks
The UInt64 value type represents unsigned integers with values ranging from 0 to 18,446,744,073,709,551,615.
Important
The UInt64 type is not CLS-compliant. The CLS-compliant alternative type is Decimal. Int64 can be used instead to replace a UInt64 value that ranges from zero to MaxValue. For more information about CLS compliance, see Language Independence and Language-Independent Components.
UInt64 provides methods to compare instances of this type, convert the value of an instance to its string representation, and convert the string representation of a number to an instance of this type.
Fields
MaxValue |
Represents the largest possible value of UInt64. This field is constant. |
MinValue |
Represents the smallest possible value of UInt64. This field is constant. |
Methods
BigMul(UInt64, UInt64) |
Produces the full product of two unsigned 64-bit numbers. |
Clamp(UInt64, UInt64, UInt64) |
Clamps a value to an inclusive minimum and maximum value. |
CompareTo(Object) |
Compares this instance to a specified object and returns an indication of their relative values. |
CompareTo(UInt64) |
Compares this instance to a specified 64-bit unsigned integer and returns an indication of their relative values. |
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(UInt64, UInt64) |
Computes the quotient and remainder of two values. |
Equals(Object) |
Returns a value indicating whether this instance is equal to a specified object. |
Equals(UInt64) |
Returns a value indicating whether this instance is equal to a specified UInt64 value. |
GetHashCode() |
Returns the hash code for this instance. |
GetTypeCode() | |
IsEvenInteger(UInt64) |
Determines if a value represents an even integral number. |
IsOddInteger(UInt64) |
Determines if a value represents an odd integral number. |
IsPow2(UInt64) |
Determines if a value is a power of two. |
LeadingZeroCount(UInt64) |
Computes the number of leading zeros in a value. |
Log2(UInt64) |
Computes the log2 of a value. |
Max(UInt64, UInt64) |
Compares two values to compute which is greater. |
Min(UInt64, UInt64) |
Compares two values to compute which is lesser. |
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. |
Parse(ReadOnlySpan<Char>, IFormatProvider) |
Parses a span of characters into a value. |
Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider) |
Converts the span representation of a number in a specified style and culture-specific format to its 64-bit unsigned integer equivalent. |
Parse(String, IFormatProvider) |
Converts the string representation of a number in a specified culture-specific format to its 64-bit unsigned integer equivalent. |
Parse(String, NumberStyles, IFormatProvider) |
Converts the string representation of a number in a specified style and culture-specific format to its 64-bit unsigned integer equivalent. |
Parse(String, NumberStyles) |
Converts the string representation of a number in a specified style to its 64-bit unsigned integer equivalent. |
Parse(String) |
Converts the string representation of a number to its 64-bit unsigned integer equivalent. |
PopCount(UInt64) |
Computes the number of bits that are set in a value. |
RotateLeft(UInt64, Int32) |
Rotates a value left by a given amount. |
RotateRight(UInt64, Int32) |
Rotates a value right by a given amount. |
Sign(UInt64) |
Computes the sign of a value. |
ToString() |
Converts the numeric value of this instance to its equivalent string representation. |
ToString(IFormatProvider) |
Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information. |
ToString(String, IFormatProvider) |
Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information. |
ToString(String) |
Converts the numeric value of this instance to its equivalent string representation using the specified format. |
TrailingZeroCount(UInt64) |
Computes the number of trailing zeros in a value. |
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. |
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Tries to format the value of the current unsigned long number instance into the provided span of characters. |
TryParse(ReadOnlySpan<Byte>, IFormatProvider, UInt64) |
Tries to parse a span of UTF-8 characters into a value. |
TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, UInt64) |
Tries to parse a span of UTF-8 characters into a value. |
TryParse(ReadOnlySpan<Byte>, UInt64) |
Tries to convert a UTF-8 character span containing the string representation of a number to its 64-bit unsigned integer equivalent. |
TryParse(ReadOnlySpan<Char>, IFormatProvider, UInt64) |
Tries to parse a span of characters into a value. |
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, UInt64) |
Tries to convert the span representation of a number in a specified style and culture-specific format to its 64-bit unsigned integer equivalent. A return value indicates whether the conversion succeeded or failed. |
TryParse(ReadOnlySpan<Char>, UInt64) |
Tries to convert the span representation of a number to its 64-bit unsigned integer equivalent. A return value indicates whether the conversion succeeded or failed. |
TryParse(String, IFormatProvider, UInt64) |
Tries to parse a string into a value. |
TryParse(String, NumberStyles, IFormatProvider, UInt64) |
Tries to convert the string representation of a number in a specified style and culture-specific format to its 64-bit unsigned integer equivalent. A return value indicates whether the conversion succeeded or failed. |
TryParse(String, UInt64) |
Tries to convert the string representation of a number to its 64-bit unsigned integer equivalent. A return value indicates whether the conversion succeeded or failed. |
Explicit Interface Implementations
Applies to
Thread Safety
All members of this type are thread safe. Members that appear to modify instance state actually return a new instance initialized with the new value. As with any other type, reading and writing to a shared variable that contains an instance of this type must be protected by a lock to guarantee thread safety.