2012年10月23日

C#: the sample usage of c# template

摘要: 1. class definition with constraints1classTest<T,V>whereV:MyType{2publicStringname;3publicTvalue;4publicvirtualvoidprint(){5Console.WriteLine("{0}={1}",name,value);6}//print()7}//class2. inherited class definition with constraint( my use constraint)12classTest2<T1,T2>:Test<T 阅读全文

posted @ 2012-10-23 23:41 learner 阅读(253) 评论(0) 推荐(0) 编辑

导航