OOPS in C# – Polymorphism Part 3
6.) Overloading in case of inheritance
public class MyBaseClass
{
public void foo(int i)
{
Console.WriteLine("The is one parameter function which takes
int as parameter and value of i is {0}.", i);
}
}
public class MyChildClass : MyBaseClass
{
public void foo(string s)
{
Console.WriteLine("The is one parameter function which takes
string as parameter and value of s is {0}.", s);
}
}