Edit

Share via


MonoPInvokeCallbackAttribute(Type) Constructor

Definition

Constructor for the MonoPInvokeCallbackAttribute.

public MonoPInvokeCallbackAttribute (Type t);
new ObjCRuntime.MonoPInvokeCallbackAttribute : Type -> ObjCRuntime.MonoPInvokeCallbackAttribute

Parameters

t
Type

The type of the delegate that will be calling us back.

Remarks

You must specify the type of the delegate that this code will be called as. The following example shows the scenario in which this is used:

using System;
	delegate void DrawPatternCallback (IntPtr voidptr, IntPtr cgcontextref);

	º [MonoPInvokeCallback (typeof (DrawPatternCallback))]
	static void DrawCallback (IntPtr voidptr, IntPtr cgcontextptr)
	{
		// This method is called from the C library
	}

Applies to