This question already has an answer here:
How can I do this in C#?
public class SomeClass<T extends SomeInterface>{}
This is a generic class of T
, and T
must implement the interface SomeInterface
.
With type constraints:
public class SomeClass<T> where T : SomeInterface