UIntPtr Structure
TOC
Collapse the table of content
Expand the table of content

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)

[SerializableAttribute]
[CLSCompliantAttribute(false)]
[ComVisibleAttribute(true)]
public struct UIntPtr : ISerializable

NameDescription
System_CAPS_pubmethodUIntPtr(UInt32)

Initializes a new instance of the UIntPtr structure using the specified 32-bit pointer or handle.

System_CAPS_pubmethodUIntPtr(UInt64)

Initializes a new instance of UIntPtr using the specified 64-bit pointer or handle.

System_CAPS_pubmethodUIntPtr(Void*)

Initializes a new instance of UIntPtr using the specified pointer to an unspecified type.

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticSize

Gets the size of this instance.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAdd(UIntPtr, Int32)

Adds an offset to the value of an unsigned pointer.

System_CAPS_pubmethodEquals(Object)

Returns a value indicating whether this instance is equal to a specified object.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodGetHashCode()

Returns the hash code for this instance.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticSubtract(UIntPtr, Int32)

Subtracts an offset from the value of an unsigned pointer.

System_CAPS_pubmethodToPointer()

Converts the value of this instance to a pointer to an unspecified type.

System_CAPS_pubmethodToString()

Converts the numeric value of this instance to its equivalent string representation.(Overrides ValueType.ToString().)

System_CAPS_pubmethodToUInt32()

Converts the value of this instance to a 32-bit unsigned integer.

System_CAPS_pubmethodToUInt64()

Converts the value of this instance to a 64-bit unsigned integer.

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticZero

A read-only field that represents a pointer or handle that has been initialized to zero.

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticAddition(UIntPtr, Int32)

Adds an offset to the value of an unsigned pointer.

System_CAPS_puboperatorSystem_CAPS_staticEquality(UIntPtr, UIntPtr)

Determines whether two specified instances of UIntPtr are equal.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(UInt32 to UIntPtr)

Converts the value of a 32-bit unsigned integer to an UIntPtr.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(UInt64 to UIntPtr)

Converts the value of a 64-bit unsigned integer to an UIntPtr.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(UIntPtr to UInt32)

Converts the value of the specified UIntPtr to a 32-bit unsigned integer.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(UIntPtr to UInt64)

Converts the value of the specified UIntPtr to a 64-bit unsigned integer.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(UIntPtr to Void*)

Converts the value of the specified UIntPtr to a pointer to an unspecified type.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(Void* to UIntPtr)

Converts the specified pointer to an unspecified type to a UIntPtr.

System_CAPS_puboperatorSystem_CAPS_staticInequality(UIntPtr, UIntPtr)

Determines whether two specified instances of UIntPtr are not equal.

System_CAPS_puboperatorSystem_CAPS_staticSubtraction(UIntPtr, Int32)

Subtracts an offset from the value of an unsigned pointer.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodISerializable.GetObjectData(SerializationInfo, StreamingContext)

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.

System_CAPS_importantImportant

   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.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1

This type is thread safe.

Return to top
Show:
© 2016 Microsoft