Example of Inheritance .
namespace Family
{
public class MathsDaddy
{
double Add(double numOne, double numTwo)
{
retunr numOne+numTwo;
}
double Subtract(double numOne, double numTwo)
{
retunr numTwo-numOne;
}
double Multiply(double numOne, double numTwo)
{
retunr numOne *numTwo;
}
}
public class MathsSon : MathsDaddy
{
double Divide(double numOne, double numTwo)
{
retunr numTwo/numOne;
}
}
}
Thanks and keep hardworking !!!
Ashumeet Mitter
No comments:
Post a Comment