2 using System.Threading;
3 using System.Runtime.InteropServices;
4 using System.Runtime.Remoting.Messaging;
7 public delegate int SimpleDelegate (int a, int b);
9 [DllImport ("libtest.so", EntryPoint="mono_invoke_delegate")]
10 static extern int mono_invoke_delegate (SimpleDelegate d);
12 public static int Add (int a, int b) {
13 Console.WriteLine ("Test.Add from delegate: " + a + "+ " + b);
18 SimpleDelegate d = new SimpleDelegate (Add);
20 mono_invoke_delegate (d);