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
Can c# inherit multiple classes?
Name the property of the textbox which cannot be changed at runtime?
Define c# and list the features.
What are virtual classes in c#?
what is the purpose of using statement in c#
Why do we use partial class in c#?
In the page load event I assigned dropdownlist’s datasource property to a valid list. On the submit button click.. The same datasource property is coming as null. Why?
Give examples for reference types?
What does an indexer do?
Is post back c#?
What is assembly c#?
Define sealed classes in c#?
What is dbcontext c#?
What is difference between virtual and override in c#?
What is namespace explain with example?