2 using System
.Runtime
.InteropServices
;
4 [AttributeUsage (AttributeTargets
.Method
)]
5 sealed class MonoPInvokeCallbackAttribute
: Attribute
{
6 public MonoPInvokeCallbackAttribute (Type t
) {}
11 public delegate char MyDelegate(int x
);
15 [MonoPInvokeCallbackAttribute (typeof (MyDelegate
))]
16 static char Test (int x
) { return (char)x; }
20 MyDelegate m
= Driver
.Test
;
21 Marshal
.GetFunctionPointerForDelegate (m
);