2 using System.Runtime.CompilerServices;
7 // this is a "public" internal call for both Mono and Microsoft
8 // http://groups.google.ca/groups?q=MethodImplAttribute+InternalCall&hl=en&lr=&selm=udngxsETCHA.1468%40tkmsftngp11&rnum=10
11 [MethodImplAttribute (MethodImplOptions.InternalCall)]
12 public static extern double Sin (double a);
16 public class Program {
18 static int TestICall ()
20 return (int) System.Math.Sin (0);
26 Console.WriteLine ("*0* System.Math.Sin(0) == {0}", TestICall ());
29 catch (SecurityException se) {
30 Console.WriteLine ("*1* SecurityException\n{0}", se);
34 Console.WriteLine ("*2* Unexpected exception\n{0}", e);