Click or drag to resize
IntPtr Structure
A platform-specific type that is used to represent a pointer or a handle.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public struct IntPtr : ISerializable

The IntPtr type exposes the following members.

Methods
  NameDescription
Public methodEquals
Returns a value indicating whether this instance is equal to a specified object.
(Overrides ValueTypeEquals(Object).)
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToInt32
Converts the value of this instance to a 32-bit signed integer.
Public methodToInt64
Converts the value of this instance to a 64-bit signed integer.
Public methodToString
Converts the numeric value of the current IntPtr object to its equivalent string representation.
(Overrides ValueTypeToString.)
Public methodToString(String)
Converts the numeric value of the current IntPtr object to its equivalent string representation.
Top
Operators
  NameDescription
Public operatorStatic memberAddition
Adds an offset to the value of a pointer.
Public operatorStatic memberEquality
Determines whether two specified instances of IntPtr are equal.
Public operatorStatic memberInequality
Determines whether two specified instances of IntPtr are not equal.
Top
Fields
  NameDescription
Public fieldStatic memberZero
A read-only field that represents a pointer or handle that has been initialized to zero.
Top
See Also