using System; class A { public virtual int test { get {return 7;} } } class B : A { public override int test { get {return 8;} } } public class Test { static void Main(string[] args) { A test1 = new A(); A test2 = new B(); Console.WriteLine(test1.test); Console.WriteLine(test2.test); } }