2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / tests / test-58.cs
old mode 100755 (executable)
new mode 100644 (file)
index 84636e8..5b7ba06
@@ -1,15 +1,27 @@
-using System;\r
-using System.Runtime.InteropServices;\r
-\r
-public class Blah {\r
-\r
-       [DllImport ("user32", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Auto)]\r
-       public static extern int MessageBox (int hWnd, string pText, string pCaption, int uType);\r
-\r
-       public static int Main ()\r
-       {\r
-               MessageBox (0, "Hello from Mono !", "PInvoke Test", 0);\r
-\r
-               return 0;\r
-       }\r
-}\r
+// Compiler options: -unsafe
+
+using System;
+using System.Reflection;
+
+public class Blah {
+       
+       public static int Main ()
+       {
+               unsafe {
+                       int* i;
+                       int foo = 10;
+
+                       void* bar;
+
+                       i = &foo;
+
+                       bar = i;
+                       
+                       Console.WriteLine ("Address : {0}", (int) i);
+               }
+
+               return 0;
+       }       
+}
+
+