Exemple #1
0
 public static void Main(string[] args)
 {
     try
     {
         Sample s = new Sample();
         s.Action();
         Console.WriteLine("ExtraAccessToAvoidException - Success (not expected)");
     }
     catch (Exception)
     {
         Console.WriteLine("ExtraAccessToAvoidException - Failed (expected)");
     }
 }
Exemple #2
0
 public static void Main(string[] args)
 {
     try
     {
         Sample s = new Sample();
         s.Action();
         Console.WriteLine("ExtraAccessToAvoidException - Success (not expected)");
     }
     catch (Exception)
     {
         Console.WriteLine("ExtraAccessToAvoidException - Failed (expected)");
     }
 }