* roottypes.cs: Rename from tree.cs.
[mono.git] / mono / tests / cas / inheritance / refload4.cs
1 using System;
2 using System.Reflection;
3 using System.Security;
4 using System.Security.Permissions;
5
6 [assembly: SecurityPermission (SecurityAction.RequestRefuse, ControlPrincipal=true)]
7
8 public class Program {
9
10         static int Main (string[] args)
11         {
12                 try {
13                         string filename = "library2b";
14                         Assembly a = Assembly.Load (filename);
15                         if (a == null) {
16                                 Console.WriteLine ("*1* Couldn't load assembly '{0}'.", filename);
17                                 return 1;
18                         } else {
19                                 Console.WriteLine ("*0* Assembly '{0}' loaded.", filename);
20                                 return 0;
21                         }
22                 }
23                 catch (SecurityException se) {
24                         Console.WriteLine ("*2* Unexpected SecurityException\n{0}", se);
25                         return 2;
26                 }
27                 catch (Exception e) {
28                         Console.WriteLine ("*3* Unexpected Exception\n{0}", e);
29                         return 3;
30                 }
31         }
32 }