MemberInfo.ReflectedType Property gets the class object that was used to obtain this instance of MemberInfo.
Imports System
Imports System.Reflection
Module Example
Sub Main()
Dim m1 As MemberInfo = GetType(Object).GetMethod("ToString")
Dim m2 As MemberInfo = GetType(MemberInfo).GetMethod("ToString")
Console.WriteLine("m1.DeclaringType: {0}", m1.DeclaringType)
Console.WriteLine("m1.ReflectedType: {0}", m1.ReflectedType)
Console.WriteLine("m2.DeclaringType: {0}", m2.DeclaringType)
Console.WriteLine("m2.ReflectedType: {0}", m2.ReflectedType)
End Sub
End Module
Related examples in the same category