MonoPInvokeCallbackAttribute(Type) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
}