|
Listing 13-11 extracted from chapter
Generics
Listing 13-10< > Listing 13-12
This listing can be compiled with the command line: csc.exe /target:library Example_13_11.cs Errors: 1 Warnings: 0
Example_13_11.cs
internal class BaseClass{}
// Compilation Error: Inconsistent accessibility:
// constraint type 'BaseClass' is less accessible than 'C<T>'
public class C<T> where T : BaseClass{}
Copyright Patrick Smacchia 2006 2007
|