* roottypes.cs: Rename from tree.cs.
[mono.git] / mono / tests / cas / inheritance / library1.cs
1 using System;
2 using System.Security.Permissions;
3 using System.Security.Principal;
4
5 [StrongNameIdentityPermission (SecurityAction.InheritanceDemand, PublicKey="0024000004800000940000000602000000240000525341310004000011000000db294bcb78b7361ed6eb5656b612ce266fc81da8c8c6cb04116fc29b5e1d09a02f6c0f387f6d97a1ce9bdbbeb2d874832ae2d2971e70144ea039c710dccab5fb0a36cb14268a83c9b435c1e7318e7915518b68c8ed056b104e76166d6cabe9b77383f26bcf6a0a0b09d04f37b2a407b47d39421a34f2fbc6e6701a1d5c2e8cbb")]
6 public abstract class BaseInheritanceDemand {
7
8         public virtual int Test () 
9         {
10                 return 1;
11         }
12 }
13
14 public class InheritanceDemand : BaseInheritanceDemand {
15
16         public override int Test ()
17         {
18                 Console.WriteLine ("*1* [this should NOT print]");
19                 return base.Test ();
20         }
21 }
22
23 public class NoSecurity {
24
25         public int Test ()
26         {
27                 Console.WriteLine ("*0* [this should print]");
28                 return 0;
29         }
30 }