Could anyone please tell the difference between these 2 Properties?
DeclaringType
and ReflectedType
Consider the code is:
public class TestClass
{
public static void TestMethod()
{
Console.WriteLine("Method in Class", MethodBase.GetCurrentMethod().DeclaringType.Name);
Console.WriteLine("Method in Class", MethodBase.GetCurrentMethod().ReflectedType.Name);
}
}
Are these same and Can be used interchangeably?