.Net > Beginner

What would be the output of following code snippet?

using System;

class MyClass
{
    public virtual void Method()
    {
        Console.WriteLine("Base Method");
    }
}
class Intermediate : MyClass
{
    public override void Method()
    {
        Console.WriteLine("Intermediate Method");
    }
}
class Derived : Intermediate
{
    public override void Method()
    {
        Console.WriteLine("Derived Method");
    }
}
class MyProgram
{
    static void Main(string[] args)
    {
        MyClass d = new Derived();
        d.Method();
        Console.ReadLine();
    }
}
Answers :
Time Left
Question Number : /20
Please do not press back or refresh button during this test.

Login

Register

Next Question