namespace ConsoleApplication8
{
class Program
{
static void Main(string[] args)
{
Person p1 = new Student();
p1.Sing();
p1.Run();
Console.WriteLine(p1.GetType().Name);
Console.Read();
}
}
class Person
{
public void Run() {
Console.WriteLine("Person Run");
}
public virtual void Sing() {
Console.WriteLine("Person Sing");
}
}
class Student : Person
{
public void Run()
{
Console.WriteLine("Student Run");
}
public override void Sing()
{
Console.WriteLine("Student Sing");
}
}
}
Object type is Student but why it doesn't run the Student Run method ,if student run method overides we can get the Result of "Student Run"...What is the concept of this