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 marshalling in c#?
Are objects passed by reference in c#?
What are destructors in C#?
What are Types of assemblies that can be created in dotnet
what are the different ways a method can be overloaded?
Explain the difference between proc. Sent by val and by sub?
What is the difference between namespace and class?
What is unsigned int?
Distinguish between system.string and system.text.stringbuilder classes?
Is vs as c#?
Is void a class?
What is a private class in c#?
Write the syntax for catching an exception in c#?
Which constructor is called first in c#?
Why we use get set in c#?