public class BaseClass
{
public sealed int Add(int a, int b)
{
a = a + b;
return a;
}
public int Minus(int a, int b)
{
a = a - b;
return a;
}
}
public class ChildClass : BaseClass
{
public override int Minus(int a, int b)
{
a = a - b;
return a;
}
public override int Add(int a, int b)
{
a = a + b;
return a;
}
}
Consider the above code gives u an error , since u cannot have a sealed method type for add in baseclass since it is being overridden in the base class..
the sealed methods cannot be overridden
Thanks
Pavan Kumar
Mark Answer if this fits the need
Rajendra.prasad, if this helps please login to Mark As Answer. | Alert Moderator