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 类型

在 C# 中,从版本 11 开始,以 .NET 7 或更高版本运行时为目标时, nuint 的别名与 的别名UIntPtrUInt32相同uint

构造函数

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)

将指定区域性特定格式的数字的字符串表示形式转换为它的等效无符号本机整数。

Parse(String, NumberStyles)

将指定样式的数字的字符串表示形式转换为它的等效无符号本机整数。

Parse(String, NumberStyles, IFormatProvider)

将指定样式和区域性特定格式的数字的字符串表示形式转换为它的等效无符号本机整数。

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)

将指定样式和区域性特定格式的数字的字符串表示形式转换为它的等效无符号本机整数。 一个指示转换是否成功的返回值。

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 的值转换为指向未指定类型的指针。

此 API 不兼容 CLS。

Explicit(Void* to UIntPtr)

将指向未指定类型的指定指针转换为 UIntPtr

此 API 不兼容 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)

尝试以 big-endian 格式将当前值写入给定范围。

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

尝试以 little-endian 格式将当前值写入给定范围。

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)

计算值的一元加号。

适用于

线程安全性

此类型是线程安全的。

另请参阅