using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace GenericClassTwo { public abstract class GenericClass//泛型类 { protected T field; public virtual T Property { get { return field; } } public GenericClass(int index) { } public GenericClass(T t) { field = t; } public abstract void method(T t); } class OrdinaryClass : GenericClass<</span>int>//普通类 { public override int Property { get { return base.Property; } } public OrdinaryClass(int t) : base(t) { } public override void method(int t) { Console.WriteLine("property value ={0}",t); } } class Program { static void Main(string[] args) { int val = 1000; OrdinaryClass or = new OrdinaryClass(val); or.method(val); Console.WriteLine("普通类继承泛型类演示成功"); Console.ReadKey(); } } }