How to find all the types in an Assembly that Inherit from a Specific Type C#

前端 未结 4 1245
孤独总比滥情好
孤独总比滥情好 2020-12-02 11:58

How do you get a collection of all the types that inherit from a specific other type?

4条回答
  •  忘掉有多难
    2020-12-02 12:12

    You have to enumerate all types and check for each if it inherits the one you're looking for.

    Some code like the one in this question may be useful for you.

提交回复
热议问题