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
Is string value type c#?
Is string nullable in c#?
What is use of private class in c#?
What is interface used in c#?
What is the difference between list and arraylist in c#?
What are the steps for creating clr trigger
What are abstract classes in c#?
Is hashset ordered c#?
What is better C# or VB.NET?
What is sql transaction in c#?
To whom a method is accesssed if it is marked as protected internal ?
What can we do to handle multiple exceptions?
What is lazy loading c#?
Does c# have functions?
Is void a class?