abstract class Abstract
{
public abstract void mul(int x);
public void add(int x, int y)
{
Console.WriteLine("add is: "+ (x + y));
}
}
class overrideabstract : Abstract
{
public override void mul(int a)
{
Console.WriteLine("mul is: "+ a*a);
}
public static void Main()
{
overrideabstract ovra = new overrideabstract();
ovra.add(4, 5);
ovra.mul(3);
Console.ReadLine();
}
}
Blog that contains articles about new technologies related or not with programming. I will describe and solves some problems that I encounter in my career. ASP .NET, AJAX, Javascript, C++, C# and SQL are some of the subjects that will appear.
31 July 2011
Abstract Overriding in console apps
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment