UIntPtr Structure
A platform-specific type that is used to represent a pointer or a handle.
This API is not CLS-compliant. Namespace: System
Assembly: mscorlib (in mscorlib.dll)
The UIntPtr type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() ![]() ![]() | UIntPtr(UInt32) | Initializes a new instance of the UIntPtr structure using the specified 32-bit pointer or handle. |
![]() ![]() ![]() ![]() | UIntPtr(UInt64) | Initializes a new instance of UIntPtr using the specified 64-bit pointer or handle. |
![]() ![]() ![]() ![]() | UIntPtr(Void*) | Initializes a new instance of UIntPtr using the specified pointer to an unspecified type. |
| Name | Description | |
|---|---|---|
![]() ![]() ![]() ![]() | Add | Adds an offset to the value of an unsigned pointer. |
![]() ![]() ![]() ![]() | Equals | Returns a value indicating whether this instance is equal to a specified object. (Overrides ValueType.Equals(Object).) |
![]() ![]() ![]() ![]() | GetHashCode | Returns the hash code for this instance. (Overrides ValueType.GetHashCode().) |
![]() ![]() ![]() ![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() ![]() ![]() | Subtract | Subtracts an offset from the value of an unsigned pointer. |
![]() ![]() ![]() ![]() | ToPointer | Converts the value of this instance to a pointer to an unspecified type. |
![]() ![]() ![]() ![]() | ToString | Converts the numeric value of this instance to its equivalent string representation. (Overrides ValueType.ToString().) |
![]() ![]() ![]() ![]() | ToUInt32 | Converts the value of this instance to a 32-bit unsigned integer. |
![]() ![]() ![]() ![]() | ToUInt64 | Converts the value of this instance to a 64-bit unsigned integer. |
| Name | Description | |
|---|---|---|
![]() ![]() ![]() ![]() | Addition | Adds an offset to the value of an unsigned pointer. |
![]() ![]() ![]() ![]() ![]() | Equality | Determines whether two specified instances of UIntPtr are equal. |
![]() ![]() ![]() ![]() ![]() | Explicit(UInt32 to UIntPtr) | Converts the value of a 32-bit unsigned integer to an UIntPtr. |
![]() ![]() ![]() ![]() ![]() | Explicit(UInt64 to UIntPtr) | Converts the value of a 64-bit unsigned integer to an UIntPtr. |
![]() ![]() ![]() ![]() ![]() | Explicit(UIntPtr to Void*) | Converts the value of the specified UIntPtr to a pointer to an unspecified type. |
![]() ![]() ![]() ![]() ![]() | Explicit(UIntPtr to UInt32) | Converts the value of the specified UIntPtr to a 32-bit unsigned integer. |
![]() ![]() ![]() ![]() ![]() | Explicit(UIntPtr to UInt64) | Converts the value of the specified UIntPtr to a 64-bit unsigned integer. |
![]() ![]() ![]() ![]() ![]() | Explicit(Void* to UIntPtr) | Converts the specified pointer to an unspecified type to a UIntPtr. |
![]() ![]() ![]() ![]() ![]() | Inequality | Determines whether two specified instances of UIntPtr are not equal. |
![]() ![]() ![]() ![]() | Subtraction | Subtracts an offset from the value of an unsigned pointer. |
| Name | Description | |
|---|---|---|
![]() ![]() | ISerializable.GetObjectData | Populates a SerializationInfo object with the data needed to serialize the current UIntPtr object. |
The UIntPtr type is designed to be an integer whose size is platform-specific. That is, an instance of this type is expected to be 32-bits on 32-bit hardware and operating systems, and 64-bits on 64-bit hardware and operating systems.
Important |
|---|
The IntPtr type is CLS-compliant, while the UIntPtr type is not. Only the IntPtr type is used in the common language runtime. The UIntPtr type is provided mostly to maintain architectural symmetry with the IntPtr type. |
The UIntPtr type can be used by languages that support pointers, and as a common means of referring to data between languages that do and do not support pointers. UIntPtr objects can also be used to hold handles.
This type implements the ISerializable interface.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.










Important