Windows apps
Collapse the table of content
Expand the table of content

UIntPtr Structure

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

A platform-specific type that is used to represent a pointer or a handle.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

[SerializableAttribute]
public struct UIntPtr

The UIntPtr type exposes the following members.

  NameDescription
Public methodEqualsIndicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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.

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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2017 Microsoft