I just have one basic question :
in below code returns only derived class methods but i don't know why . kindly help to find out the problem.
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
A value = new B();
value.method();
Console.Read();
}
}
class A
{
public void method()
{
Console.WriteLine("A");
}
}
class B : A
{
public void method()
{
Console.WriteLine("B");
}
}