Type Parameters Interfaces

suggest change

Declaration:

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) { ... }

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents