Can C# generics have a specific base type?

后端 未结 3 619
猫巷女王i
猫巷女王i 2020-12-13 12:34

Is it possible for a generic interface\'s type to be based on a specific parent class?

For example:

public interface IGenericFace

        
3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 13:16

    public interface IGenericFace where T : SomeBaseClass
    

提交回复
热议问题