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 IDisposal interface
Explain different properties of object oriented systems.
What is c# entity framework?
What is the extension of c# file?
Name the property of the textbox which cannot be changed at runtime?
What is garbage collection? How to force garbage collector to run?
Why do we need private constructor in c#?
What is difference between dictionary and list in c#?
Why do I get a "cs5001: does not have an entry point defined" error when compiling?
What is default boolean value in c#?
Which namespaces are necessary to create a localized application?
Is c# a strongly-typed language?
What is difference between new and override in c#?
What are types in c#?
What is console based application?