In one of my recent projects, I needed to create a new generic abstract class which implements another generic class and a couple other interfaces.
public interface InterfaceA
{
}
public interface InterfaceB
{
}
public class BaseGenericClass<T>
{
}
I also needed to restrict the generic type in this generic abstract class to a specific type
public class Constraint
{
}
This is not something I commonly need to do so I was not sure what the syntax would be. After a bit of trials and errors, this is how it ended up
public abstract class GenericClass<T> : BaseGenericClass<T>, InterfaceA, InterfaceB where T : Constraint
{
}