[netcore] Ongoing work. (#13391)
[mono-project.git] / mono / tests / bug-461867.cs
blob39290ab1eae4b85a7e0c83f4a8d4f54d2804a5c8
1 using System;
2 using System.Runtime.InteropServices;
4 [AttributeUsage (AttributeTargets.Method)]
5 sealed class MonoPInvokeCallbackAttribute : Attribute {
6 public MonoPInvokeCallbackAttribute (Type t) {}
9 namespace TestApp
11 public delegate char MyDelegate(int x);
13 class Driver
15 [MonoPInvokeCallbackAttribute (typeof (MyDelegate))]
16 static char Test (int x) { return (char)x; }
18 static int Main()
20 MyDelegate m = Driver.Test;
21 Marshal.GetFunctionPointerForDelegate (m);
22 return 0;