why overriding in the following situation?
suppose i have like this
class a
{
public virtual int add(int x ,int y)
{
retunt x+y;
}
}
class a:b
{
public Override int add(int x ,int y)
{
/// some logic here
}
}
in the above situation i can get the child and parent add() method by creating object on them then why i go for Overriding ?
is there is any performance issues are there ?like memory allocation...etc?
Plz help me ...........


Mahesh ChandRank #1 · 393.3K reputationPosted Feb 28, 2011, 4:45 AM EST
Naresh Babu GopavaramRank #9,687 · 203 reputationPosted Feb 28, 2011, 4:50 AM EST
Krishna GaradRank #191 · 12.8K reputationPosted Feb 28, 2011, 6:21 PM EST
VulpesRank #55 · 29.2K reputationPosted Mar 1, 2011, 12:05 AM EST