开发者

Get class that method was defined in?

Given a MethodInfo obje开发者_运维问答ct, how can I get the Type object for the class that it was defined in?


You're looking for the DeclaringType property:

Gets the class that declares this member.


Oh... I think it's DeclaringType.


You can get the Type the method belongs to with the DeclaringType property

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜