|
Listing 13-27 extracted from chapter
Generics
Listing 13-26< > Listing 13-28
This listing can be compiled with the command line: csc.exe /target:library Example_13_27.cs Errors: 0 Warnings: 0
Example_13_27.cs
class B {
public virtual void Fct() { }
}
class D<T> : B where T : new(){
public override void Fct() {
T t = new T();
}
}
Copyright Patrick Smacchia 2006 2007
|