2
Answers

Interface

Ask a question
Maha

Maha

12y
927
1
This is Listing 6 program in the following website (http://www.developer.com/net/csharp/article.php/1482651/Working-with-Interfaces-in-C.htm).

The program is not executing. Please fix the error.

//Listing 6

using System;

interface Interdemo
{
void Show();
}

interface Interdemo1
{
void Show();
}

class Interclash : Interdemo, Interdemo1
{
void Interdemo.Show()
{
Console.WriteLine("Show() method Implemented");
}

void Interdemo1.Show()
{
Console.WriteLine("Display() method Implemented");
}

public static void Main(string[] args)
{
Interclash inter = new Interclash();
inter.Interdemo.Show();
inter.Interdemo1.Show();

Console.ReadKey();
}
}

Answers (2)