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 is the Difference between the public and private ?
What problem does Delegate Solve?
In which way a two-dimensional array declared in C#?
Why is main static in c#?
Can we change static value in c#?
What are the steps to create an assembly and add it to the gac?
What is the default modifier for class in c#?
What is the purpose of static?
Okay, so an int is a value type, and a class is a reference type. How can int be derived from object?
What is console used for?
What's the difference between a static method and a non static method c#?
How do I download a program to my desktop?
What is linq c#?
What are strongly typed objects?
How do you escape in c#?