asp.net.ph

IntPtr Structure

System Namespace


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

IntPtr Class Members

Collapse   Constructors

Visibility Constructor Parameters
public IntPtr ( Int32 value )
public IntPtr ( Int64 value )
public IntPtr ( Void value )

Collapse   Fields

Visibility Name Type
public static Zero IntPtr

Collapse   Properties

Visibility Name Value Type Accessibility
public static Size Int32 [ Get ]

Collapse   Methods

Visibility Name Parameters Return Type
public static Add ( IntPtr pointer , Int32 offset ) IntPtr
public Equals ( Object obj ) Boolean
public GetHashCode ( ) Int32
public static Subtract ( IntPtr pointer , Int32 offset ) IntPtr
public ToInt32 ( ) Int32
public ToInt64 ( ) Int64
public ToPointer ( ) Void
public ToString ( ) String
public ToString ( String format ) String

Remarks

The IntPtr type is designed to be a platform-specific, machine-sized integer. 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 IntPtr 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.

IntPtr objects can also be used to hold handles. For example, instances of IntPtr are used extensively in the System.IO.FileStream class to hold file handles.

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.

This type implements the ISerializable interface.

See Also

UIntPtr Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph