|
Listing 13-22 extracted from chapter
Generics
Listing 13-21< > Listing 13-23
This listing can be compiled with the command line: csc.exe /target:exe Example_13_22.cs Errors: 0 Warnings: 0
Example_13_22.cs
class C<T>{
public static void PrintTypes(){
System.Console.WriteLine( typeof( C<T> ).FullName );
System.Console.WriteLine( typeof( C<C<T>> ).FullName );
}
}
class Program {
static void Main() {
C<string>.PrintTypes();
C<int>.PrintTypes();
}
}
Copyright Patrick Smacchia 2006 2007
|