|
Listing 13-5 extracted from chapter
Generics
Listing 13-4< > Listing 13-6
This listing can be compiled with the command line: csc.exe /target:library Example_13_5.cs Errors: 1 Warnings: 0
Example_13_5.cs
interface I<T> { void Fct(); }
// Compilation Error:
// 'C<U,V>' cannot implement both 'I<U>' and 'I<V>' because they
// may unify for some type parameter substitutions.
class C<U, V> : I<U>, I<V>{
void I<U>.Fct() { }
void I<V>.Fct() { }
}
Copyright Patrick Smacchia 2006 2007
|