3 using System.Security.Permissions;
4 using System.Security.Principal;
6 class BaseInheritanceDemand {
8 [PrincipalPermission (SecurityAction.InheritanceDemand, Authenticated=false)]
9 public virtual void Test ()
11 Console.WriteLine ("*0* BaseInheritanceDemand.Test [this should print]");
15 class InheritanceDemand : BaseInheritanceDemand {
17 public override void Test ()
23 static int Main (string[] args)
26 new InheritanceDemand ().Test ();
29 catch (SecurityException se) {
30 Console.WriteLine ("*1* Unexpected SecurityException\n{0}", se);
34 Console.WriteLine ("*2* Unexpected Exception\n{0}", e);