RuntimeMethodHandle.GetFunctionPointer Method

Definition

Obtains a pointer to the method represented by this instance.

public:
 IntPtr GetFunctionPointer();
public IntPtr GetFunctionPointer ();
[System.Security.SecurityCritical]
public IntPtr GetFunctionPointer ();
member this.GetFunctionPointer : unit -> nativeint
[<System.Security.SecurityCritical>]
member this.GetFunctionPointer : unit -> nativeint
Public Function GetFunctionPointer () As IntPtr

Returns

IntPtr

A pointer to the method represented by this instance.

Attributes

Exceptions

The caller does not have the necessary permission to perform this operation.

Remarks

The returned IntPtr is meant for internal runtime usage and should not be used to call the function from native code. Use Marshal.GetFunctionPointerForDelegate in order to get a function pointer that can be passed to native code.

Applies to