Calling a static method using a Type

前端 未结 3 553
逝去的感伤
逝去的感伤 2020-11-30 12:33

How do I call a static method from a Type, assuming I know the value of the Type variable and the name of the static method?

public         


        
3条回答
  •  野性不改
    2020-11-30 12:54

    Check into the MethodInfo class and the GetMethod() methods on Type.

    There are a number of different overloads for different situations.

提交回复
热议问题