3 using System.Runtime.InteropServices;
8 [DllImport ("libtest.so", EntryPoint="mono_test_marshal_stringbuilder")]
9 public static extern void mono_test_marshal_stringbuilder (StringBuilder sb, int len);
11 public static int Main () {
12 StringBuilder sb = new StringBuilder(255);
13 mono_test_marshal_stringbuilder (sb, sb.Capacity);
14 Console.Write ("name: ");
15 String res = sb.ToString();
16 Console.WriteLine (res);
18 if (res != "This is my message. Isn't it nice?")