Answer Posted / srinivasa reddy
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace InterfaceExample
{
interface IA
{
void MethodA();
}
class Program : IA
{
static void Main(string[] args)
{
IA InterfaceA = new Program();
InterfaceA.MethodA();
Console.ReadKey();
}
void IA.MethodA()
{
Console.WriteLine("This is a test");
}
}
}
| Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
what are implementation inheritance and interface inheritance?
Which attribute adorn a test class to be picked up by the NUnit GUI in the NUnit test framework?
What are the differences between value types and reference types?
How do I open the console window?
What is a generic class?
Is c sharp free?
What is difference between asp net and c# net?
What is lastindexof c#?
What is value c#?
What is the benefit of delegate in c#?
What is msil, and why should developers need an appreciation of it if at all?
What's the implicit name of the parameter that gets passed into the set method/property of a class?
What is default boolean value in c#?
Explain the use of virtual, sealed, override, and abstract method?
Can we inherit abstract class in c#?