2 using System
.Reflection
;
4 namespace NewslotVirtualFinal
6 internal interface INewslotVirtualFinal
12 internal class NewslotVirtualFinal
: INewslotVirtualFinal
14 private NewslotVirtualFinal()
18 public void SomeMethod()
22 public virtual void SomeMethod2()
29 public static int Main ()
31 Type t
= typeof (NewslotVirtualFinal
);
32 MethodInfo mi
= t
.GetMethod ("SomeMethod");
33 if (mi
.Attributes
!= (MethodAttributes
.PrivateScope
| MethodAttributes
.Public
| MethodAttributes
.Final
| MethodAttributes
.Virtual
| MethodAttributes
.HideBySig
| MethodAttributes
.VtableLayoutMask
))
36 mi
= t
.GetMethod ("SomeMethod2");
37 if (mi
.Attributes
!= (MethodAttributes
.PrivateScope
| MethodAttributes
.Public
| MethodAttributes
.Virtual
| MethodAttributes
.HideBySig
| MethodAttributes
.VtableLayoutMask
))
40 Console
.WriteLine ("OK");