Type Parameters Interfaces
suggest changeDeclaration:
interface IMyGenericInterface<T1, T2, T3, ...> { ... }
Usage (in inheritance):
class ClassA<T1, T2, T3> : IMyGenericInterface<T1, T2, T3> { ... }
class ClassB<T1, T2> : IMyGenericInterface<T1, T2, int> { ... }
class ClassC<T1> : IMyGenericInterface<T1, char, int> { ... }
class ClassD : IMyGenericInterface<bool, char, int> { ... }
Usage (as the type of a parameter):
void SomeMethod(IMyGenericInterface<int, char, bool> arg) { ... }
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents