UIntPtr 結構

定義

重要

此 API 不符合 CLS 規範。

表示不帶正負號的整數,其中位寬度與指標相同。

public value class UIntPtr
public value class UIntPtr : IComparable, IComparable<UIntPtr>, IEquatable<UIntPtr>, IFormattable, System::Runtime::Serialization::ISerializable
public value class UIntPtr : IComparable, IComparable<UIntPtr>, IEquatable<UIntPtr>, ISpanFormattable, System::Runtime::Serialization::ISerializable
public value class UIntPtr : IComparable<UIntPtr>, IEquatable<UIntPtr>, IParsable<UIntPtr>, ISpanParsable<UIntPtr>, System::Numerics::IAdditionOperators<UIntPtr, UIntPtr, UIntPtr>, System::Numerics::IAdditiveIdentity<UIntPtr, UIntPtr>, System::Numerics::IBinaryInteger<UIntPtr>, System::Numerics::IBinaryNumber<UIntPtr>, System::Numerics::IBitwiseOperators<UIntPtr, UIntPtr, UIntPtr>, System::Numerics::IComparisonOperators<UIntPtr, UIntPtr, bool>, System::Numerics::IDecrementOperators<UIntPtr>, System::Numerics::IDivisionOperators<UIntPtr, UIntPtr, UIntPtr>, System::Numerics::IEqualityOperators<UIntPtr, UIntPtr, bool>, System::Numerics::IIncrementOperators<UIntPtr>, System::Numerics::IMinMaxValue<UIntPtr>, System::Numerics::IModulusOperators<UIntPtr, UIntPtr, UIntPtr>, System::Numerics::IMultiplicativeIdentity<UIntPtr, UIntPtr>, System::Numerics::IMultiplyOperators<UIntPtr, UIntPtr, UIntPtr>, System::Numerics::INumber<UIntPtr>, System::Numerics::INumberBase<UIntPtr>, System::Numerics::IShiftOperators<UIntPtr, int, UIntPtr>, System::Numerics::ISubtractionOperators<UIntPtr, UIntPtr, UIntPtr>, System::Numerics::IUnaryNegationOperators<UIntPtr, UIntPtr>, System::Numerics::IUnaryPlusOperators<UIntPtr, UIntPtr>, System::Numerics::IUnsignedNumber<UIntPtr>, System::Runtime::Serialization::ISerializable
public value class UIntPtr : IComparable<UIntPtr>, IEquatable<UIntPtr>, IParsable<UIntPtr>, ISpanParsable<UIntPtr>, IUtf8SpanParsable<UIntPtr>, System::Numerics::IAdditionOperators<UIntPtr, UIntPtr, UIntPtr>, System::Numerics::IAdditiveIdentity<UIntPtr, UIntPtr>, System::Numerics::IBinaryInteger<UIntPtr>, System::Numerics::IBinaryNumber<UIntPtr>, System::Numerics::IBitwiseOperators<UIntPtr, UIntPtr, UIntPtr>, System::Numerics::IComparisonOperators<UIntPtr, UIntPtr, bool>, System::Numerics::IDecrementOperators<UIntPtr>, System::Numerics::IDivisionOperators<UIntPtr, UIntPtr, UIntPtr>, System::Numerics::IEqualityOperators<UIntPtr, UIntPtr, bool>, System::Numerics::IIncrementOperators<UIntPtr>, System::Numerics::IMinMaxValue<UIntPtr>, System::Numerics::IModulusOperators<UIntPtr, UIntPtr, UIntPtr>, System::Numerics::IMultiplicativeIdentity<UIntPtr, UIntPtr>, System::Numerics::IMultiplyOperators<UIntPtr, UIntPtr, UIntPtr>, System::Numerics::INumber<UIntPtr>, System::Numerics::INumberBase<UIntPtr>, System::Numerics::IShiftOperators<UIntPtr, int, UIntPtr>, System::Numerics::ISubtractionOperators<UIntPtr, UIntPtr, UIntPtr>, System::Numerics::IUnaryNegationOperators<UIntPtr, UIntPtr>, System::Numerics::IUnaryPlusOperators<UIntPtr, UIntPtr>, System::Numerics::IUnsignedNumber<UIntPtr>, System::Runtime::Serialization::ISerializable
public value class UIntPtr : IEquatable<UIntPtr>, System::Runtime::Serialization::ISerializable
public value class UIntPtr : System::Runtime::Serialization::ISerializable
[System.CLSCompliant(false)]
public struct UIntPtr
[System.CLSCompliant(false)]
public readonly struct UIntPtr : IComparable, IComparable<UIntPtr>, IEquatable<UIntPtr>, IFormattable, System.Runtime.Serialization.ISerializable
[System.CLSCompliant(false)]
public readonly struct UIntPtr : IComparable, IComparable<UIntPtr>, IEquatable<UIntPtr>, ISpanFormattable, System.Runtime.Serialization.ISerializable
[System.CLSCompliant(false)]
public readonly struct UIntPtr : IComparable<UIntPtr>, IEquatable<UIntPtr>, IParsable<UIntPtr>, ISpanParsable<UIntPtr>, System.Numerics.IAdditionOperators<UIntPtr,UIntPtr,UIntPtr>, System.Numerics.IAdditiveIdentity<UIntPtr,UIntPtr>, System.Numerics.IBinaryInteger<UIntPtr>, System.Numerics.IBinaryNumber<UIntPtr>, System.Numerics.IBitwiseOperators<UIntPtr,UIntPtr,UIntPtr>, System.Numerics.IComparisonOperators<UIntPtr,UIntPtr,bool>, System.Numerics.IDecrementOperators<UIntPtr>, System.Numerics.IDivisionOperators<UIntPtr,UIntPtr,UIntPtr>, System.Numerics.IEqualityOperators<UIntPtr,UIntPtr,bool>, System.Numerics.IIncrementOperators<UIntPtr>, System.Numerics.IMinMaxValue<UIntPtr>, System.Numerics.IModulusOperators<UIntPtr,UIntPtr,UIntPtr>, System.Numerics.IMultiplicativeIdentity<UIntPtr,UIntPtr>, System.Numerics.IMultiplyOperators<UIntPtr,UIntPtr,UIntPtr>, System.Numerics.INumber<UIntPtr>, System.Numerics.INumberBase<UIntPtr>, System.Numerics.IShiftOperators<UIntPtr,int,UIntPtr>, System.Numerics.ISubtractionOperators<UIntPtr,UIntPtr,UIntPtr>, System.Numerics.IUnaryNegationOperators<UIntPtr,UIntPtr>, System.Numerics.IUnaryPlusOperators<UIntPtr,UIntPtr>, System.Numerics.IUnsignedNumber<UIntPtr>, System.Runtime.Serialization.ISerializable
[System.CLSCompliant(false)]
public readonly struct UIntPtr : IComparable<UIntPtr>, IEquatable<UIntPtr>, IParsable<UIntPtr>, ISpanParsable<UIntPtr>, IUtf8SpanParsable<UIntPtr>, System.Numerics.IAdditionOperators<UIntPtr,UIntPtr,UIntPtr>, System.Numerics.IAdditiveIdentity<UIntPtr,UIntPtr>, System.Numerics.IBinaryInteger<UIntPtr>, System.Numerics.IBinaryNumber<UIntPtr>, System.Numerics.IBitwiseOperators<UIntPtr,UIntPtr,UIntPtr>, System.Numerics.IComparisonOperators<UIntPtr,UIntPtr,bool>, System.Numerics.IDecrementOperators<UIntPtr>, System.Numerics.IDivisionOperators<UIntPtr,UIntPtr,UIntPtr>, System.Numerics.IEqualityOperators<UIntPtr,UIntPtr,bool>, System.Numerics.IIncrementOperators<UIntPtr>, System.Numerics.IMinMaxValue<UIntPtr>, System.Numerics.IModulusOperators<UIntPtr,UIntPtr,UIntPtr>, System.Numerics.IMultiplicativeIdentity<UIntPtr,UIntPtr>, System.Numerics.IMultiplyOperators<UIntPtr,UIntPtr,UIntPtr>, System.Numerics.INumber<UIntPtr>, System.Numerics.INumberBase<UIntPtr>, System.Numerics.IShiftOperators<UIntPtr,int,UIntPtr>, System.Numerics.ISubtractionOperators<UIntPtr,UIntPtr,UIntPtr>, System.Numerics.IUnaryNegationOperators<UIntPtr,UIntPtr>, System.Numerics.IUnaryPlusOperators<UIntPtr,UIntPtr>, System.Numerics.IUnsignedNumber<UIntPtr>, System.Runtime.Serialization.ISerializable
[System.CLSCompliant(false)]
public struct UIntPtr : IEquatable<UIntPtr>, System.Runtime.Serialization.ISerializable
[System.CLSCompliant(false)]
public readonly struct UIntPtr : IEquatable<UIntPtr>, System.Runtime.Serialization.ISerializable
[System.CLSCompliant(false)]
[System.Serializable]
public struct UIntPtr : System.Runtime.Serialization.ISerializable
[System.CLSCompliant(false)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct UIntPtr : System.Runtime.Serialization.ISerializable
[System.CLSCompliant(false)]
public struct UIntPtr : System.Runtime.Serialization.ISerializable
[<System.CLSCompliant(false)>]
type unativeint = struct
[<System.CLSCompliant(false)>]
type unativeint = struct
    interface IFormattable
    interface ISerializable
[<System.CLSCompliant(false)>]
type unativeint = struct
    interface ISpanFormattable
    interface IFormattable
    interface ISerializable
[<System.CLSCompliant(false)>]
type unativeint = struct
    interface IFormattable
    interface IParsable<unativeint>
    interface ISpanFormattable
    interface ISpanParsable<unativeint>
    interface IAdditionOperators<unativeint, unativeint, unativeint>
    interface IAdditiveIdentity<unativeint, unativeint>
    interface IBinaryInteger<unativeint>
    interface IBinaryNumber<unativeint>
    interface IBitwiseOperators<unativeint, unativeint, unativeint>
    interface IComparisonOperators<unativeint, unativeint, bool>
    interface IEqualityOperators<unativeint, unativeint, bool>
    interface IDecrementOperators<unativeint>
    interface IDivisionOperators<unativeint, unativeint, unativeint>
    interface IIncrementOperators<unativeint>
    interface IModulusOperators<unativeint, unativeint, unativeint>
    interface IMultiplicativeIdentity<unativeint, unativeint>
    interface IMultiplyOperators<unativeint, unativeint, unativeint>
    interface INumber<unativeint>
    interface INumberBase<unativeint>
    interface ISubtractionOperators<unativeint, unativeint, unativeint>
    interface IUnaryNegationOperators<unativeint, unativeint>
    interface IUnaryPlusOperators<unativeint, unativeint>
    interface IShiftOperators<unativeint, int, unativeint>
    interface IMinMaxValue<unativeint>
    interface IUnsignedNumber<unativeint>
    interface ISerializable
[<System.CLSCompliant(false)>]
type unativeint = struct
    interface IFormattable
    interface IParsable<unativeint>
    interface ISpanFormattable
    interface ISpanParsable<unativeint>
    interface IAdditionOperators<unativeint, unativeint, unativeint>
    interface IAdditiveIdentity<unativeint, unativeint>
    interface IBinaryInteger<unativeint>
    interface IBinaryNumber<unativeint>
    interface IBitwiseOperators<unativeint, unativeint, unativeint>
    interface IComparisonOperators<unativeint, unativeint, bool>
    interface IEqualityOperators<unativeint, unativeint, bool>
    interface IDecrementOperators<unativeint>
    interface IDivisionOperators<unativeint, unativeint, unativeint>
    interface IIncrementOperators<unativeint>
    interface IModulusOperators<unativeint, unativeint, unativeint>
    interface IMultiplicativeIdentity<unativeint, unativeint>
    interface IMultiplyOperators<unativeint, unativeint, unativeint>
    interface INumber<unativeint>
    interface INumberBase<unativeint>
    interface ISubtractionOperators<unativeint, unativeint, unativeint>
    interface IUnaryNegationOperators<unativeint, unativeint>
    interface IUnaryPlusOperators<unativeint, unativeint>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<unativeint>
    interface IShiftOperators<unativeint, int, unativeint>
    interface IMinMaxValue<unativeint>
    interface IUnsignedNumber<unativeint>
    interface ISerializable
[<System.CLSCompliant(false)>]
type unativeint = struct
    interface IFormattable
    interface IParsable<unativeint>
    interface ISpanFormattable
    interface ISpanParsable<unativeint>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<unativeint>
    interface IAdditionOperators<unativeint, unativeint, unativeint>
    interface IAdditiveIdentity<unativeint, unativeint>
    interface IBinaryInteger<unativeint>
    interface IBinaryNumber<unativeint>
    interface IBitwiseOperators<unativeint, unativeint, unativeint>
    interface IComparisonOperators<unativeint, unativeint, bool>
    interface IEqualityOperators<unativeint, unativeint, bool>
    interface IDecrementOperators<unativeint>
    interface IDivisionOperators<unativeint, unativeint, unativeint>
    interface IIncrementOperators<unativeint>
    interface IModulusOperators<unativeint, unativeint, unativeint>
    interface IMultiplicativeIdentity<unativeint, unativeint>
    interface IMultiplyOperators<unativeint, unativeint, unativeint>
    interface INumber<unativeint>
    interface INumberBase<unativeint>
    interface ISubtractionOperators<unativeint, unativeint, unativeint>
    interface IUnaryNegationOperators<unativeint, unativeint>
    interface IUnaryPlusOperators<unativeint, unativeint>
    interface IShiftOperators<unativeint, int, unativeint>
    interface IMinMaxValue<unativeint>
    interface IUnsignedNumber<unativeint>
    interface ISerializable
[<System.CLSCompliant(false)>]
type unativeint = struct
    interface ISerializable
[<System.CLSCompliant(false)>]
[<System.Serializable>]
type unativeint = struct
    interface ISerializable
[<System.CLSCompliant(false)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type unativeint = struct
    interface ISerializable
Public Structure UIntPtr
Public Structure UIntPtr
Implements IComparable, IComparable(Of UIntPtr), IEquatable(Of UIntPtr), IFormattable, ISerializable
Public Structure UIntPtr
Implements IComparable, IComparable(Of UIntPtr), IEquatable(Of UIntPtr), ISerializable, ISpanFormattable
Public Structure UIntPtr
Implements IAdditionOperators(Of UIntPtr, UIntPtr, UIntPtr), IAdditiveIdentity(Of UIntPtr, UIntPtr), IBinaryInteger(Of UIntPtr), IBinaryNumber(Of UIntPtr), IBitwiseOperators(Of UIntPtr, UIntPtr, UIntPtr), IComparable(Of UIntPtr), IComparisonOperators(Of UIntPtr, UIntPtr, Boolean), IDecrementOperators(Of UIntPtr), IDivisionOperators(Of UIntPtr, UIntPtr, UIntPtr), IEqualityOperators(Of UIntPtr, UIntPtr, Boolean), IEquatable(Of UIntPtr), IIncrementOperators(Of UIntPtr), IMinMaxValue(Of UIntPtr), IModulusOperators(Of UIntPtr, UIntPtr, UIntPtr), IMultiplicativeIdentity(Of UIntPtr, UIntPtr), IMultiplyOperators(Of UIntPtr, UIntPtr, UIntPtr), INumber(Of UIntPtr), INumberBase(Of UIntPtr), IParsable(Of UIntPtr), ISerializable, IShiftOperators(Of UIntPtr, Integer, UIntPtr), ISpanParsable(Of UIntPtr), ISubtractionOperators(Of UIntPtr, UIntPtr, UIntPtr), IUnaryNegationOperators(Of UIntPtr, UIntPtr), IUnaryPlusOperators(Of UIntPtr, UIntPtr), IUnsignedNumber(Of UIntPtr)
Public Structure UIntPtr
Implements IAdditionOperators(Of UIntPtr, UIntPtr, UIntPtr), IAdditiveIdentity(Of UIntPtr, UIntPtr), IBinaryInteger(Of UIntPtr), IBinaryNumber(Of UIntPtr), IBitwiseOperators(Of UIntPtr, UIntPtr, UIntPtr), IComparable(Of UIntPtr), IComparisonOperators(Of UIntPtr, UIntPtr, Boolean), IDecrementOperators(Of UIntPtr), IDivisionOperators(Of UIntPtr, UIntPtr, UIntPtr), IEqualityOperators(Of UIntPtr, UIntPtr, Boolean), IEquatable(Of UIntPtr), IIncrementOperators(Of UIntPtr), IMinMaxValue(Of UIntPtr), IModulusOperators(Of UIntPtr, UIntPtr, UIntPtr), IMultiplicativeIdentity(Of UIntPtr, UIntPtr), IMultiplyOperators(Of UIntPtr, UIntPtr, UIntPtr), INumber(Of UIntPtr), INumberBase(Of UIntPtr), IParsable(Of UIntPtr), ISerializable, IShiftOperators(Of UIntPtr, Integer, UIntPtr), ISpanParsable(Of UIntPtr), ISubtractionOperators(Of UIntPtr, UIntPtr, UIntPtr), IUnaryNegationOperators(Of UIntPtr, UIntPtr), IUnaryPlusOperators(Of UIntPtr, UIntPtr), IUnsignedNumber(Of UIntPtr), IUtf8SpanParsable(Of UIntPtr)
Public Structure UIntPtr
Implements IEquatable(Of UIntPtr), ISerializable
Public Structure UIntPtr
Implements ISerializable
繼承
UIntPtr
屬性
實作
IComparable IComparable<UIntPtr> IEquatable<UIntPtr> IFormattable ISerializable ISpanFormattable IComparable<TSelf> IEquatable<TSelf> IParsable<UIntPtr> IParsable<TSelf> ISpanParsable<UIntPtr> ISpanParsable<TSelf> IAdditionOperators<UIntPtr,UIntPtr,UIntPtr> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<UIntPtr,UIntPtr> IAdditiveIdentity<TSelf,TSelf> IBinaryInteger<UIntPtr> IBinaryNumber<UIntPtr> IBinaryNumber<TSelf> IBitwiseOperators<UIntPtr,UIntPtr,UIntPtr> IBitwiseOperators<TSelf,TSelf,TSelf> IComparisonOperators<UIntPtr,UIntPtr,Boolean> IComparisonOperators<TSelf,TSelf,Boolean> IDecrementOperators<UIntPtr> IDecrementOperators<TSelf> IDivisionOperators<UIntPtr,UIntPtr,UIntPtr> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<UIntPtr,UIntPtr,Boolean> IEqualityOperators<TSelf,TOther,TResult> IEqualityOperators<TSelf,TSelf,Boolean> IIncrementOperators<UIntPtr> IIncrementOperators<TSelf> IMinMaxValue<UIntPtr> IModulusOperators<UIntPtr,UIntPtr,UIntPtr> IModulusOperators<TSelf,TSelf,TSelf> IMultiplicativeIdentity<UIntPtr,UIntPtr> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<UIntPtr,UIntPtr,UIntPtr> IMultiplyOperators<TSelf,TSelf,TSelf> INumber<UIntPtr> INumber<TSelf> INumberBase<UIntPtr> INumberBase<TSelf> IShiftOperators<UIntPtr,Int32,UIntPtr> IShiftOperators<TSelf,Int32,TSelf> ISubtractionOperators<UIntPtr,UIntPtr,UIntPtr> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<UIntPtr,UIntPtr> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<UIntPtr,UIntPtr> IUnaryPlusOperators<TSelf,TSelf> IUnsignedNumber<UIntPtr> IUtf8SpanFormattable IUtf8SpanParsable<UIntPtr> IUtf8SpanParsable<TSelf>

備註

UIntPtr 類型設計成整數,其大小與指標相同。 也就是說,此類型的實例預期在 32 位進程中為 32 位,而 64 位進程則為 64 位。

UIntPtr 類型可由支援指標的語言使用,以及當做參考語言之間資料且不支援指標的常見方法。 UIntPtr 物件也可以用來保存控制碼。

注意

使用 UIntPtr 作為指標或控制碼很容易出錯且不安全。 它只是整數類型,因為大小相同,可用來做為指標和控制碼的交換格式。 在特定的交換需求之外,例如將資料傳遞至不支援指標的語言,應該使用正確型別的指標來表示指標, SafeHandle 而且應該用來表示控制碼。

此類型會實作 ISerializable 。 在 .NET 5 和更新版本中,此類型也會實作 IFormattable 介面。 在 .NET 7 和更新版本中,此類型也會實作 IBinaryInteger<TSelf>IMinMaxValue<TSelf>IUnsignedNumber<TSelf> 介面。

從 9.0 版開始的 C# 中,您可以使用內 nuint 建類型來定義原生大小的整數。 此類型是以內部類型表示, UIntPtr 並提供適合整數類型的作業和轉換。 如需詳細資訊,請參閱 nint 和 nuint 類型

從 11 版開始,在以 .NET 7 或更新版本執行時間為目標的 C# 中,是 的別名, nuintuint 與 的別名 UIntPtrUInt32 相同。

建構函式

UIntPtr(UInt32)

使用指定的 32 位不帶正負號的整數, UIntPtr 初始化 結構的新實例。

UIntPtr(UInt64)

使用指定的 64 位不帶正負號的整數,初始化 的新實例 UIntPtr

UIntPtr(Void*)

對未指定的類型使用指定的指標,初始化 UIntPtr 的新執行個體。

欄位

Zero

唯讀欄位,表示已初始化為零的不帶正負號整數。

屬性

MaxValue

代表 UIntPtr 最大的可能值。

MinValue

代表 UIntPtr 最小的可能值。

Size

取得這個執行個體的大小。

方法

Add(UIntPtr, Int32)

將位移加入至不帶正負號的整數。

Clamp(UIntPtr, UIntPtr, UIntPtr)

將值限制為內含最小值和最大值。

CompareTo(Object)

將目前的執行個體與相同類型的另一個物件相比較,並傳回整數,這個整數表示目前的執行個體在排序次序中,位於另一個物件之前、之後或相同位置。

CompareTo(UIntPtr)

將目前的執行個體與相同類型的另一個物件相比較,並傳回整數,這個整數表示目前的執行個體在排序次序中,位於另一個物件之前、之後或相同位置。

CreateChecked<TOther>(TOther)

從值建立目前類型的實例,針對落在目前類型可表示範圍以外的任何值擲回溢位例外狀況。

CreateSaturating<TOther>(TOther)

從值建立目前型別的實例,使落在目前類型可表示範圍以外的任何值飽和。

CreateTruncating<TOther>(TOther)

從值建立目前型別的實例,截斷落在目前類型可表示範圍以外的任何值。

DivRem(UIntPtr, UIntPtr)

計算兩個值的商數和餘數。

Equals(Object)

傳回值,該值表示這個執行個體是否和指定的物件相等。

Equals(UIntPtr)

指出目前的物件是否等於另一個相同類型的物件。

GetHashCode()

傳回這個執行個體的雜湊碼。

IsEvenInteger(UIntPtr)

判斷值是否代表偶數整數。

IsOddInteger(UIntPtr)

判斷值是否代表奇數整數。

IsPow2(UIntPtr)

判斷值是否為 2 的乘冪。

LeadingZeroCount(UIntPtr)

計算值中前置零的數目。

Log2(UIntPtr)

計算值的 log2。

Max(UIntPtr, UIntPtr)

比較兩個值與大於的計算。

Min(UIntPtr, UIntPtr)

比較兩個值與比較較少的計算。

Parse(ReadOnlySpan<Byte>, IFormatProvider)

將 UTF-8 字元的範圍剖析為值。

Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider)

將 UTF-8 字元的範圍剖析為值。

Parse(ReadOnlySpan<Char>, IFormatProvider)

將字元範圍剖析為值。

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

將選擇性指定樣式中數位之字元表示的唯讀範圍,以及選擇性地指定文化特性特定格式轉換為其不帶正負號的原生整數對等專案。

Parse(String)

將數字的字串表示法轉換成其對等不帶正負號的原生整數。

Parse(String, IFormatProvider)

將指定特定文化特性 (Culture) 格式之數字的字串表示法轉換成其對等不帶正負號的原生整數。

Parse(String, NumberStyles)

將指定樣式之數字的字串表示法轉換成其對等不帶正負號的原生整數。

Parse(String, NumberStyles, IFormatProvider)

將指定樣式和文化特性 (Culture) 特定格式之數字的字串表示法轉換成其對等不帶正負號的原生整數。

PopCount(UIntPtr)

計算值中所設定的位數。

RotateLeft(UIntPtr, Int32)

將值向左旋轉指定的數量。

RotateRight(UIntPtr, Int32)

以指定的數量向右旋轉值。

Sign(UIntPtr)

計算值的符號。

Subtract(UIntPtr, Int32)

從不帶正負號的整數減去位移。

ToPointer()

將這個執行個體的值轉換為未指定類型的指標。

ToString()

將這個執行個體的數值轉換為其相等字串表示。

ToString(IFormatProvider)

使用指定的格式和特定文化特性格式資訊,將這個執行個體的數值轉換成它的相等字串表示。

ToString(String)

使用指定格式,將這個執行個體的數值轉換成它的相等字串表示。

ToString(String, IFormatProvider)

使用指定的格式,格式化目前執行個體的值。

ToUInt32()

將這個執行個體的值轉換為 32 位元不帶正負號的整數。

ToUInt64()

將這個執行個體的值轉換為 64 位元不帶正負號的整數。

TrailingZeroCount(UIntPtr)

計算值中尾端零的數目。

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

嘗試將目前實例的值格式化為 UTF-8 到提供的位元組範圍。

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

嘗試將目前實例的值格式化為提供的字元範圍。

TryParse(ReadOnlySpan<Byte>, IFormatProvider, UIntPtr)

嘗試將 UTF-8 字元的範圍剖析為值。

TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, UIntPtr)

嘗試將 UTF-8 字元的範圍剖析為值。

TryParse(ReadOnlySpan<Byte>, UIntPtr)

嘗試將包含數位字串表示的 UTF-8 字元範圍轉換為其不帶正負號的整數對等專案。

TryParse(ReadOnlySpan<Char>, IFormatProvider, UIntPtr)

嘗試將字串剖析成值。

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

將指定樣式和文化特性特定格式之數位之字元表示的唯讀範圍,轉換為其不帶正負號的原生整數對等專案。 傳回指示轉換是否成功的值。

TryParse(ReadOnlySpan<Char>, UIntPtr)

將數位字元表示的唯讀範圍轉換為其不帶正負號的原生整數對等專案。 傳回指示轉換是否成功的值。

TryParse(String, IFormatProvider, UIntPtr)

嘗試將字串剖析成值。

TryParse(String, NumberStyles, IFormatProvider, UIntPtr)

將指定樣式和文化特性 (Culture) 特定格式之數字的字串表示法轉換成其對等不帶正負號的原生整數。 傳回指示轉換是否成功的值。

TryParse(String, UIntPtr)

將數字的字串表示法轉換成其對等不帶正負號的原生整數。 傳回指示轉換是否成功的值。

運算子

Addition(UIntPtr, Int32)

將位移加入至不帶正負號的整數。

Equality(UIntPtr, UIntPtr)

判斷 UIntPtr 的兩個指定執行個體是否相等。

Explicit(UInt32 to UIntPtr)

將 32 位元不帶正負號整數的值轉換為 UIntPtr

Explicit(UInt64 to UIntPtr)

將 64 位元不帶正負號整數的值轉換為 UIntPtr

Explicit(UIntPtr to UInt32)

將指定的 UIntPtr 值轉換為 32 位元不帶正負號的整數。

Explicit(UIntPtr to UInt64)

將指定的 UIntPtr 值轉換為 64 位元不帶正負號的整數。

Explicit(UIntPtr to Void*)

將指定的 UIntPtr 值轉換為未指定的類型指標。

此應用程式開發介面不符合 CLS 標準。

Explicit(Void* to UIntPtr)

將指定的指標轉換為 UIntPtr 的未指定類型。

此應用程式開發介面不符合 CLS 標準。

Inequality(UIntPtr, UIntPtr)

判斷 UIntPtr 的兩個指定執行個體是否不相等。

Subtraction(UIntPtr, Int32)

從不帶正負號的整數減去位移。

明確介面實作

IAdditionOperators<UIntPtr,UIntPtr,UIntPtr>.Addition(UIntPtr, UIntPtr)

將兩個值相加以計算其總和。

IAdditionOperators<UIntPtr,UIntPtr,UIntPtr>.CheckedAddition(UIntPtr, UIntPtr)

將兩個值相加以計算其總和。

IAdditiveIdentity<UIntPtr,UIntPtr>.AdditiveIdentity

取得目前型別的加法識別。

IBinaryInteger<UIntPtr>.GetByteCount()

取得將寫入為 的 TryWriteLittleEndian(Span<Byte>, Int32) 位元組數目。

IBinaryInteger<UIntPtr>.GetShortestBitLength()

取得目前值之最短兩個補數標記法的長度,以位為單位。

IBinaryInteger<UIntPtr>.TryReadBigEndian(ReadOnlySpan<Byte>, Boolean, UIntPtr)

表示不帶正負號的整數,其中位寬度與指標相同。

IBinaryInteger<UIntPtr>.TryReadLittleEndian(ReadOnlySpan<Byte>, Boolean, UIntPtr)

表示不帶正負號的整數,其中位寬度與指標相同。

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

嘗試以大到大到大的格式,將目前的值寫入指定的範圍。

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

嘗試以位元組端格式將目前的值寫入指定的範圍。

IBinaryNumber<UIntPtr>.AllBitsSet

取得已設定所有位的二進位型別實例。

IBitwiseOperators<UIntPtr,UIntPtr,UIntPtr>.BitwiseAnd(UIntPtr, UIntPtr)

計算兩個值的位和 。

IBitwiseOperators<UIntPtr,UIntPtr,UIntPtr>.BitwiseOr(UIntPtr, UIntPtr)

計算兩個值的位或 。

IBitwiseOperators<UIntPtr,UIntPtr,UIntPtr>.ExclusiveOr(UIntPtr, UIntPtr)

計算兩個值的獨佔或兩個值。

IBitwiseOperators<UIntPtr,UIntPtr,UIntPtr>.OnesComplement(UIntPtr)

計算指定值的一補數標記法。

IComparisonOperators<UIntPtr,UIntPtr,Boolean>.GreaterThan(UIntPtr, UIntPtr)

比較兩個值,以判斷哪一個值更大。

IComparisonOperators<UIntPtr,UIntPtr,Boolean>.GreaterThanOrEqual(UIntPtr, UIntPtr)

比較兩個值,以判斷哪一個值大於或相等。

IComparisonOperators<UIntPtr,UIntPtr,Boolean>.LessThan(UIntPtr, UIntPtr)

比較兩個值,以判斷哪一個值較少。

IComparisonOperators<UIntPtr,UIntPtr,Boolean>.LessThanOrEqual(UIntPtr, UIntPtr)

比較兩個值,以判斷哪一個值小於或相等。

IDecrementOperators<UIntPtr>.CheckedDecrement(UIntPtr)

遞減值。

IDecrementOperators<UIntPtr>.Decrement(UIntPtr)

遞減值。

IDivisionOperators<UIntPtr,UIntPtr,UIntPtr>.Division(UIntPtr, UIntPtr)

將一個值除以計算其商數。

IEquatable<UIntPtr>.Equals(UIntPtr)

傳回值,這個值表示這個實例是否等於另一個不帶正負號的整數。

IIncrementOperators<UIntPtr>.CheckedIncrement(UIntPtr)

遞增值。

IIncrementOperators<UIntPtr>.Increment(UIntPtr)

遞增值。

IMinMaxValue<UIntPtr>.MaxValue

取得目前型別的最大值。

IMinMaxValue<UIntPtr>.MinValue

取得目前型別的最小值。

IModulusOperators<UIntPtr,UIntPtr,UIntPtr>.Modulus(UIntPtr, UIntPtr)

將兩個值相除以計算其模數或餘數。

IMultiplicativeIdentity<UIntPtr,UIntPtr>.MultiplicativeIdentity

取得目前型別的乘法識別。

IMultiplyOperators<UIntPtr,UIntPtr,UIntPtr>.CheckedMultiply(UIntPtr, UIntPtr)

將兩個值相乘以計算其乘積。

IMultiplyOperators<UIntPtr,UIntPtr,UIntPtr>.Multiply(UIntPtr, UIntPtr)

將兩個值相乘以計算其乘積。

INumber<UIntPtr>.CopySign(UIntPtr, UIntPtr)

將值的正負號複製到另一個值的正負號。

INumber<UIntPtr>.MaxNumber(UIntPtr, UIntPtr)

比較兩個值與計算,如果輸入為 NaN ,則會傳回另一個值。

INumber<UIntPtr>.MinNumber(UIntPtr, UIntPtr)

比較兩個值與計算,如果輸入 NaN 為 ,則會傳回另一個值。

INumberBase<UIntPtr>.Abs(UIntPtr)

計算值的絕對值。

INumberBase<UIntPtr>.IsCanonical(UIntPtr)

判斷值是否在其標準標記法中。

INumberBase<UIntPtr>.IsComplexNumber(UIntPtr)

判斷值是否代表複數。

INumberBase<UIntPtr>.IsFinite(UIntPtr)

判斷值是否有限。

INumberBase<UIntPtr>.IsImaginaryNumber(UIntPtr)

判斷值是否代表純虛數。

INumberBase<UIntPtr>.IsInfinity(UIntPtr)

判斷值是否為無限。

INumberBase<UIntPtr>.IsInteger(UIntPtr)

判斷值是否代表整數。

INumberBase<UIntPtr>.IsNaN(UIntPtr)

判斷值是否為 NaN。

INumberBase<UIntPtr>.IsNegative(UIntPtr)

判斷值是否為負值。

INumberBase<UIntPtr>.IsNegativeInfinity(UIntPtr)

判斷值是否為負無限大。

INumberBase<UIntPtr>.IsNormal(UIntPtr)

判斷值是否正常。

INumberBase<UIntPtr>.IsPositive(UIntPtr)

判斷值是否為正數。

INumberBase<UIntPtr>.IsPositiveInfinity(UIntPtr)

判斷值是否為正無限大。

INumberBase<UIntPtr>.IsRealNumber(UIntPtr)

判斷值是否代表實數。

INumberBase<UIntPtr>.IsSubnormal(UIntPtr)

判斷值是否為次正常。

INumberBase<UIntPtr>.IsZero(UIntPtr)

判斷值是否為零。

INumberBase<UIntPtr>.MaxMagnitude(UIntPtr, UIntPtr)

比較兩個值與大於的計算。

INumberBase<UIntPtr>.MaxMagnitudeNumber(UIntPtr, UIntPtr)

比較兩個值與具有較大大小的計算,如果輸入為 NaN ,則會傳回另一個值。

INumberBase<UIntPtr>.MinMagnitude(UIntPtr, UIntPtr)

比較兩個值與比較較少的計算。

INumberBase<UIntPtr>.MinMagnitudeNumber(UIntPtr, UIntPtr)

比較兩個值與計算,其大小較小,如果輸入為 NaN ,則會傳回另一個值。

INumberBase<UIntPtr>.One

取得型別的值 1

INumberBase<UIntPtr>.Radix

取得類型的基數或基底。

INumberBase<UIntPtr>.TryConvertFromChecked<TOther>(TOther, UIntPtr)

表示不帶正負號的整數,其中位寬度與指標相同。

INumberBase<UIntPtr>.TryConvertFromSaturating<TOther>(TOther, UIntPtr)

表示不帶正負號的整數,其中位寬度與指標相同。

INumberBase<UIntPtr>.TryConvertFromTruncating<TOther>(TOther, UIntPtr)

表示不帶正負號的整數,其中位寬度與指標相同。

INumberBase<UIntPtr>.TryConvertToChecked<TOther>(UIntPtr, TOther)

嘗試將目前類型的實例轉換成另一個類型,針對落在目前類型可表示範圍以外的任何值擲回溢位例外狀況。

INumberBase<UIntPtr>.TryConvertToSaturating<TOther>(UIntPtr, TOther)

嘗試將目前類型的實例轉換成另一種類型,使落在目前類型可表示範圍以外的任何值飽和。

INumberBase<UIntPtr>.TryConvertToTruncating<TOther>(UIntPtr, TOther)

嘗試將目前類型的實例轉換成另一個類型,截斷落在目前類型可表示範圍以外的任何值。

INumberBase<UIntPtr>.Zero

取得型別的值 0

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

使用序列化目前 SerializationInfo 物件所需的資料,填入 UIntPtr 物件。

IShiftOperators<UIntPtr,Int32,UIntPtr>.LeftShift(UIntPtr, Int32)

將值左移指定的數量。

IShiftOperators<UIntPtr,Int32,UIntPtr>.RightShift(UIntPtr, Int32)

以指定的數量向右移值。

IShiftOperators<UIntPtr,Int32,UIntPtr>.UnsignedRightShift(UIntPtr, Int32)

以指定的數量向右移值。

ISubtractionOperators<UIntPtr,UIntPtr,UIntPtr>.CheckedSubtraction(UIntPtr, UIntPtr)

減去兩個值來計算其差異。

ISubtractionOperators<UIntPtr,UIntPtr,UIntPtr>.Subtraction(UIntPtr, UIntPtr)

減去兩個值來計算其差異。

IUnaryNegationOperators<UIntPtr,UIntPtr>.CheckedUnaryNegation(UIntPtr)

計算值的已檢查一元否定。

IUnaryNegationOperators<UIntPtr,UIntPtr>.UnaryNegation(UIntPtr)

計算值的一元負數。

IUnaryPlusOperators<UIntPtr,UIntPtr>.UnaryPlus(UIntPtr)

計算值的一元加號。

適用於

執行緒安全性

此型別具備執行緒安全。

另請參閱