Reputation: 282825
Given a MethodInfo
object, how can I get the Type
object for the class that it was defined in?
Upvotes: 40
Views: 10858
Reputation: 229058
You can get the Type the method belongs to with the DeclaringType property
Upvotes: 5
Reputation: 269298
You're looking for the DeclaringType
property:
Gets the class that declares this member.
Upvotes: 60