2 using System.Reflection;
4 using System.Security.Permissions;
6 [assembly: SecurityPermission (SecurityAction.RequestRefuse, UnmanagedCode=true)]
10 // Math.Sin is a "public" internal call for both Mono and Microsoft
11 private const string icall = "Sin";
13 static int TestReflectedICall ()
15 MethodInfo mi = typeof (System.Math).GetMethod (icall);
17 Console.WriteLine ("*3* Couldn't reflect on internalcall {0}", icall);
21 return (int) (double) mi.Invoke (null, new object [1] { 0.0 });
27 int result = TestReflectedICall ();
28 Console.WriteLine ("*{0}* [Reflected]System.Math.Sin(0) == {0}", result);
31 catch (SecurityException se) {
32 Console.WriteLine ("*1* SecurityException\n{0}", se);
36 Console.WriteLine ("*2* Unexpected exception\n{0}", e);