UInt64 Struktura

Definicja

Ważne

Ten interfejs API nie jest zgodny ze specyfikacją CLS.

Reprezentuje 64-bitową niepodpisaną liczbę całkowitą.

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, 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)]
[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)>]
[<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 IComparable, IConvertible, IFormattable
Public Structure UInt64
Implements IComparable, IComparable(Of ULong), IEquatable(Of ULong), IFormattable
Dziedziczenie
UInt64
Atrybuty
Implementuje
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>

Uwagi

UInt64 Typ wartości reprezentuje niepodpisane liczby całkowite z wartościami od 0 do 18 446 744 073 709 551 615.

Ważne

Typ UInt64 nie jest zgodny ze specyfikacją CLS. Alternatywnym typem zgodnym ze specyfikacją CLS jest Decimal. Int64 Zamiast tego można zastąpić UInt64 wartość, która waha się od zera do MaxValue. Aby uzyskać więcej informacji na temat zgodności clS, zobacz Niezależność języka i składniki Language-Independent.

UInt64 Udostępnia metody porównywania wystąpień tego typu, konwertowania wartości wystąpienia na reprezentację ciągu i konwertowania reprezentacji ciągu liczby na wystąpienie tego typu.

Pola

MaxValue

Reprezentuje największą możliwą wartość .UInt64 To pole jest stałe.

MinValue

Reprezentuje najmniejszą możliwą wartość .UInt64 To pole jest stałe.

Metody

Clamp(UInt64, UInt64, UInt64)

Zaciska wartość do wartości minimalnej i maksymalnej.

CompareTo(Object)

Porównuje to wystąpienie z określonym obiektem i zwraca wskazanie ich względnych wartości.

CompareTo(UInt64)

Porównuje to wystąpienie z 64-bitową niepodpisaną liczbą całkowitą i zwraca wskazanie ich wartości względnych.

CreateChecked<TOther>(TOther)

Tworzy wystąpienie bieżącego typu z wartości, zgłaszając wyjątek przepełnienia dla wszystkich wartości, które wykraczają poza reprezentatywny zakres bieżącego typu.

CreateSaturating<TOther>(TOther)

Tworzy wystąpienie bieżącego typu z wartości, saturując wszystkie wartości, które mieszczą się poza reprezentatywnym zakresem bieżącego typu.

CreateTruncating<TOther>(TOther)

Tworzy wystąpienie bieżącego typu z wartości, obcinając wszystkie wartości, które wykraczają poza reprezentatywny zakres bieżącego typu.

DivRem(UInt64, UInt64)

Oblicza iloraz i pozostałą część dwóch wartości.

Equals(Object)

Zwraca wartość wskazującą, czy to wystąpienie jest równe podanemu obiektowi.

Equals(UInt64)

Zwraca wartość wskazującą, czy to wystąpienie jest równe określonej UInt64 wartości.

GetHashCode()

Zwraca wartość skrótu dla tego wystąpienia.

GetTypeCode()

Zwraca wartość TypeCode dla typu UInt64wartości .

IsEvenInteger(UInt64)

Określa, czy wartość reprezentuje parzystą liczbę całkowitą.

IsOddInteger(UInt64)

Określa, czy wartość reprezentuje nieparzystą liczbę całkowitą.

IsPow2(UInt64)

Określa, czy wartość jest mocą dwóch.

LeadingZeroCount(UInt64)

Oblicza liczbę zer wiodących w wartości.

Log2(UInt64)

Oblicza dziennik2 wartości.

Max(UInt64, UInt64)

Porównuje dwie wartości z obliczeniami, które są większe.

Min(UInt64, UInt64)

Porównuje dwie wartości z obliczeniami, które są mniejsze.

Parse(ReadOnlySpan<Char>, IFormatProvider)

Analizuje zakres znaków w wartości.

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

Konwertuje reprezentację zakresu liczby w określonym stylu i formacie specyficznym dla kultury na odpowiednik 64-bitowej liczby całkowitej bez znaku.

Parse(String)

Konwertuje reprezentację ciągu liczby na 64-bitową niepodpisaną liczbę całkowitą równoważną.

Parse(String, IFormatProvider)

Konwertuje reprezentację ciągu liczby w określonym formacie specyficznym dla kultury na odpowiednik 64-bitowej liczby całkowitej bez znaku.

Parse(String, NumberStyles)

Konwertuje reprezentację ciągu liczby w określonym stylu na odpowiednik 64-bitowej liczby całkowitej bez znaku.

Parse(String, NumberStyles, IFormatProvider)

Konwertuje reprezentację ciągu liczby w określonym stylu i formacie specyficznym dla kultury na odpowiednik 64-bitowej liczby całkowitej bez znaku.

PopCount(UInt64)

Oblicza liczbę bitów ustawionych w wartości.

RotateLeft(UInt64, Int32)

Obraca wartość pozostawioną przez daną kwotę.

RotateRight(UInt64, Int32)

Obraca wartość z prawej strony według danej kwoty.

Sign(UInt64)

Oblicza znak wartości.

ToString()

Konwertuje wartość liczbową tego wystąpienia na równoważną reprezentację w postaci ciągu.

ToString(IFormatProvider)

Konwertuje wartość liczbową tego wystąpienia na równoważną reprezentację w postaci ciągu przy użyciu podanych danych formatowania specyficznych dla kultury.

ToString(String)

Konwertuje wartość liczbową tego wystąpienia na równoważną reprezentację ciągu przy użyciu określonego formatu.

ToString(String, IFormatProvider)

Konwertuje wartość liczbową tego wystąpienia na równoważną reprezentację w postaci ciągu przy użyciu podanego formatu i informacji specyficznych dla kultury.

TrailingZeroCount(UInt64)

Oblicza liczbę końcowych zer w wartości.

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

Próbuje sformatować wartość bieżącego niepodpisanego wystąpienia długiej liczby w podanym zakresie znaków.

TryParse(ReadOnlySpan<Char>, IFormatProvider, UInt64)

Próbuje przeanalizować zakres znaków w wartości.

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

Próbuje przekonwertować reprezentację zakresu liczby w określonym stylu i formacie specyficznym dla kultury na odpowiednik 64-bitowej liczby całkowitej bez znaku. Zwracana wartość wskazuje, czy konwersja powiodła się czy nie.

TryParse(ReadOnlySpan<Char>, UInt64)

Próbuje przekonwertować reprezentację zakresu liczby na 64-bitową niepodpisaną liczbę całkowitą równoważną. Zwracana wartość wskazuje, czy konwersja powiodła się czy nie.

TryParse(String, IFormatProvider, UInt64)

Próbuje przeanalizować ciąg w wartość.

TryParse(String, NumberStyles, IFormatProvider, UInt64)

Próbuje przekonwertować reprezentację ciągu liczby w określonym stylu i formacie specyficznym dla kultury na odpowiednik 64-bitowej liczby całkowitej bez znaku. Zwracana wartość wskazuje, czy konwersja powiodła się czy nie.

TryParse(String, UInt64)

Próbuje przekonwertować reprezentację ciągu liczby na odpowiednik 64-bitowej liczby całkowitej bez znaku. Zwracana wartość wskazuje, czy konwersja powiodła się czy nie.

Jawne implementacje interfejsu

IBinaryInteger<UInt64>.GetByteCount()

Pobiera liczbę bajtów, które zostaną zapisane w ramach TryWriteLittleEndian(Span<Byte>, Int32)elementu .

IBinaryInteger<UInt64>.GetShortestBitLength()

Pobiera długość w bitach najkrótszej reprezentacji bieżącej wartości.

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

Próbuje zapisać bieżącą wartość w formacie big-endian do danego zakresu.

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

Próbuje zapisać bieżącą wartość w formacie little-endian do danego zakresu.

IComparable.CompareTo(Object)

Porównuje to wystąpienie z określonym obiektem i zwraca wskazanie ich względnych wartości.

IConvertible.GetTypeCode()

Zwraca wartość TypeCode dla typu UInt64wartości .

IConvertible.ToBoolean(IFormatProvider)

Aby uzyskać opis tego elementu członkowskiego, zobacz ToBoolean(IFormatProvider).

IConvertible.ToByte(IFormatProvider)

Aby uzyskać opis tego elementu członkowskiego, zobacz ToByte(IFormatProvider).

IConvertible.ToChar(IFormatProvider)

Aby uzyskać opis tego elementu członkowskiego, zobacz ToChar(IFormatProvider).

IConvertible.ToDateTime(IFormatProvider)

Ta konwersja nie jest obsługiwana. Próba użycia tej metody zgłasza błąd InvalidCastException.

IConvertible.ToDecimal(IFormatProvider)

Aby uzyskać opis tego elementu członkowskiego, zobacz ToDecimal(IFormatProvider).

IConvertible.ToDouble(IFormatProvider)

Aby uzyskać opis tego elementu członkowskiego, zobacz ToDouble(IFormatProvider).

IConvertible.ToInt16(IFormatProvider)

Aby uzyskać opis tego elementu członkowskiego, zobacz ToInt16(IFormatProvider).

IConvertible.ToInt32(IFormatProvider)

Aby uzyskać opis tego elementu członkowskiego, zobacz ToInt32(IFormatProvider).

IConvertible.ToInt64(IFormatProvider)

Aby uzyskać opis tego elementu członkowskiego, zobacz ToInt64(IFormatProvider).

IConvertible.ToSByte(IFormatProvider)

Aby uzyskać opis tego elementu członkowskiego, zobacz ToSByte(IFormatProvider).

IConvertible.ToSingle(IFormatProvider)

Aby uzyskać opis tego elementu członkowskiego, zobacz ToSingle(IFormatProvider).

IConvertible.ToType(Type, IFormatProvider)

Aby uzyskać opis tego elementu członkowskiego, zobacz ToType(Type, IFormatProvider).

IConvertible.ToUInt16(IFormatProvider)

Aby uzyskać opis tego elementu członkowskiego, zobacz ToUInt16(IFormatProvider).

IConvertible.ToUInt32(IFormatProvider)

Aby uzyskać opis tego elementu członkowskiego, zobacz ToUInt32(IFormatProvider).

IConvertible.ToUInt64(IFormatProvider)

Aby uzyskać opis tego elementu członkowskiego, zobacz ToUInt64(IFormatProvider).

Dotyczy

Bezpieczeństwo wątkowe

Wszystkie elementy członkowskie tego typu są bezpieczne wątkowo. Elementy członkowskie, które na pierwszy rzut oka modyfikują stan wystąpienia, w rzeczywistości zwracają nowe wystąpienie zainicjowane z nową wartością. Podobnie jak w przypadku innych typów odczytywanie i zapisywanie w udostępnionej zmiennej, która zawiera wystąpienie tego typu, musi być chronione przez blokadę w celu zagwarantowania bezpieczeństwa wątków.

Zobacz też