Hi All,
Why we need method overriding? instead of we can create new method
EX:
class Employee
{
public string GetName()
{
}
public virtual string SayHello()
{
return "hello good morning";
}
}
Class Student:Employee
{
public override string SayHello()
{
return "Hello good Night";
}
}
Here my question is instead of overriding SayHello() we can create New method SayHello
Class Student:Employee
{
public string SayHello()
{
return "Hello good Night";
}
}
please explain.
Thanks,
Manohar G


Ashiwani SharmaRank #5,816 · 285 reputationPosted Oct 17, 2016, 7:46 PM EDT
Manohar Gova154 reputationPosted Oct 17, 2016, 8:15 PM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Oct 17, 2016, 8:46 PM EDT