2 using System.Runtime.InteropServices;
6 [DllImport ("libtest", EntryPoint="mono_test_return_string")]
7 public static extern String mono_test_return_string (ReturnStringDelegate d);
9 public static String managed_return_string (String s) {
11 Console.WriteLine ("delegate called: " + s);
18 public delegate String ReturnStringDelegate (String s);
20 public static int Main () {
21 ReturnStringDelegate d = new ReturnStringDelegate (managed_return_string);
22 String s = mono_test_return_string (d);
24 Console.WriteLine ("Received: " + s);