interface IPrinter
{
void print(string a);
}
interface IPrinter1
{
void print(string a);
}
class Program
{
static void Main(string[] args)
{
IPrinter p = new Printer();
p.print("rahul");
Printer p1 = new Printer();
((IPrinter)p1).print("overlaoded");
}
}
class Printer : IPrinter, IPrinter1
{
void IPrinter.print(string a)
{
Console.Write(a + "Printer");
Console.ReadLine();
}
void IPrinter1.print(string a)
{
Console.Write(a+"Printer1");
Console.ReadLine();
}
}
Monday, August 10, 2015
interface with same method name in c#
Subscribe to:
Post Comments (Atom)
ASP.NET Core
Certainly! Here are 10 advanced .NET Core interview questions covering various topics: 1. **ASP.NET Core Middleware Pipeline**: Explain the...
-
The error message you encountered ("DeleteService FAILED 1072: The specified service has been marked for deletion") indicates tha...
-
When running npx (with any arguments, but -v is easiest to test) from the global install folder, the following error is produced. ...
No comments:
Post a Comment