public class Base
{
public virtual void foo(int x)
{
Console.WriteLine("Base foo(int)");
}
}

public class Derived: Base
{
public void foo(int x)
{
Console.WriteLine("Derived foo(int)");
}
}

class Program
{
static void Main(string[] args)
{
Derived d = new Derived();
int i = 10;
d.foo(i);
}
}

 Posted by Santosh.impossible on 1/19/2011 | Category: OOPS Interview questions | Views: 15717 | Points: 40
Select from following answers:
  1. Derived foo(int)Base foo(int)
  2. Derived foo(int)
  3. Base foo(int)
  4. Base foo(int)Derived foo(int)
  5. All Above

Show Correct Answer


Source: Interview | Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response