How to constrain generic type to must have a construtor that takes certain parameters?

前端 未结 5 900
没有蜡笔的小新
没有蜡笔的小新 2020-12-03 05:07

I have a wrapper generic class that intended to be used with a set of types. Those types are generated by a utility and are all derived from a base class ClientBase. While C

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-03 05:48

    Unfortunately what you're trying to do isn't possible.

    MSDN article on Type Constraints

提交回复
热议问题