UIntPtr Constructors

Definition

Initializes a new instance of UIntPtr.

Overloads

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.

UIntPtr(UInt32)

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

public:
 UIntPtr(System::UInt32 value);
public UIntPtr (uint value);
new unativeint : uint32 -> unativeint
Public Sub New (value As UInteger)

Parameters

value
UInt32

A pointer or handle contained in a 32-bit unsigned integer.

Applies to

UIntPtr(UInt64)

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

public:
 UIntPtr(System::UInt64 value);
public UIntPtr (ulong value);
new unativeint : uint64 -> unativeint
Public Sub New (value As ULong)

Parameters

value
UInt64

A pointer or handle contained in a 64-bit unsigned integer.

Exceptions

On a 32-bit platform, value is too large to represent as an UIntPtr.

Remarks

An exception is only thrown if the value of value requires more bits than the current platform supports.

Applies to

UIntPtr(Void*)

Important

This API is not CLS-compliant.

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

public:
 UIntPtr(void* value);
public UIntPtr (void* value);
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public UIntPtr (void* value);
[System.CLSCompliant(false)]
public UIntPtr (void* value);
new unativeint : nativeptr<unit> -> unativeint
[<System.CLSCompliant(false)>]
[<System.Security.SecurityCritical>]
new unativeint : nativeptr<unit> -> unativeint
[<System.CLSCompliant(false)>]
new unativeint : nativeptr<unit> -> unativeint

Parameters

value
Void*

A pointer to an unspecified type.

Attributes

See also

Applies to