interface Interface
{
void add(int x, int y);
}
class overrideinterface : Interface
{
public void add(int a, int b)
{
Console.WriteLine("add is: " + (a + b));
}
public static void Main()
{
overrideinterface ovri = new overrideinterface();
ovri.add(5, 5);
Console.ReadLine();
}
}
Note: A class can inherit any no.of interfaces separated by comma(,)
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
Interface overriding in console apps
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment