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
Give an example of a directcast.
Why do we need to call CG.SupressFinalize?
If a method's return type is void, can you use a return keyword in the method?
What is a cshtml file?
Are classes passed by reference in c#?
What is static void main in c#?
What is .cs file in c#?
What is datatable and dataset in c#?
What are native functions?
Explain about Error handling and how this is done
What language is arduino?
what is IDisposal interface
Are structs value types c#?
How do I declare inout arguments in c#?
What is an int c#?