3
Answers

InterFace with same method

 interface S1
{
     public void ShowMessage();
}

interface S2
{
     public void ShowMessage();
}

public class Program : S1, S2
{
    public  void ShowMessage()
    {
        Console.WriteLine("Show Message..............");
    }


    static void Main(string[] args)
    {
        Program p = new Program();
        p.ShowMessage();
    }
}

What is the output ?
if there is an error or if it is not shown, why
Can we use explicit interface here

Answers (3)