using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication3 { public interface I1 { void Run(); } public abstract class aa { public abstract void Run(); public virtual void Run1() { } } public class c : aa { public c():base() { } public override void Run() { throw new NotImplementedException(); } public override void Run1() { } } public class a : I1 { public void Run() { } } public class b : I1 { public void Run() { } } class 接口 { public 接口() { I1 i = new b(); i.Run(); } } } //泛型的代码 using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication3 { class Fanxing { public Fanxing() { string aa = "aaaaaaaaaaaaaaa"; ArrayList list1 = new ArrayList(); list1.Add(aa); IList<string> aaaa = new List<string>(); aaaa.Add(aa); Fram<ccc> fram=new Fram<ccc>; } } }