using System;
using System.Reflection;

class Base
{
    public void Foo()
    {
    }
}

class Derived : Base
{
}

class Program
{
    static void Main(string[] args)
    {
        MemberInfo bf = typeof(Base).GetMethod("Foo");
        MemberInfo df = typeof(Derived).GetMethod("Foo");

        Console.WriteLine("Klasa Base    - DeclaringType: {0}, ReflectedType: {1}",
                          bf.DeclaringType, bf.ReflectedType);
        Console.WriteLine("Klasa Derived - DeclaringType: {0}, ReflectedType: {1}",
                          df.DeclaringType, df.ReflectedType);
    }
}
