Edit

Share via


GCHandleExtensions.GetAddressOfArrayData<T> Method

Definition

Important

This API is not CLS-compliant.

Retrieves the address of the array data in handle.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static T* GetAddressOfArrayData(System::Runtime::InteropServices::PinnedGCHandle<cli::array <T> ^> handle);
[System.CLSCompliant(false)]
public static T* GetAddressOfArrayData<T>(this System.Runtime.InteropServices.PinnedGCHandle<T[]> handle);
[<System.CLSCompliant(false)>]
static member GetAddressOfArrayData : System.Runtime.InteropServices.PinnedGCHandle<'T[]> -> nativeptr<'T>

Type Parameters

T

Parameters

handle
PinnedGCHandle<T[]>

The handle to retrieve the pointer from.

Returns

T*

The address of the 0th array element of the pinned array, or null if the handle doesn't point to any object.

Attributes

Exceptions

The handle is not initialized or is already disposed.

Applies to