Type Parameters (Interfaces) C# with Example



Type Parameters (Interfaces) C# with Example

Declaration: 
interface IMyGenericInterface { ... } 
Usage (in inheritance): 
class ClassA : IMyGenericInterface { ... } 
class ClassB : IMyGenericInterface { ... } 
class ClassC : IMyGenericInterface { ... } 
class ClassD : IMyGenericInterface { ... } 
Usage (as the type of a parameter): 
void SomeMethod(IMyGenericInterface arg) { ... } 
 

0 Comment's

Comment Form

Submit Comment