.Net > Input > Beginner Next/Skip this question

What would be the output of following code snippet?

using System;

interface MyInterface
{
    void MyMethod();
}


class MyClass : MyInterface
{
    public void MyClassMethod()
    {
        Console.WriteLine("Class Method");
    }

    void MyMethod()
    {
        Console.WriteLine("Interface Method");
    }
}

class MyProgram
{
    static void Main(string[] args)
    {
        MyClass m = new MyClass();
        m.MyClassMethod();
        Console.ReadLine();
    }
}
Answers :
Explaination :
social share share on facebook share on twitter share on google plus share on linkedin
Add Comments :

Login

Register

Next Question