ExamVeda
Login
Home
Classes and Objects in C Sharp
?

Select the sequence of execution of function f1(), f2() & f3() in C# .NET CODE?
class base
{
    public void f1() {}
    public virtual void f2() {}
    public virtual  void f3() {}
}
class derived :base
{
    new public void f1() {}
    public override void f2() {}
    public new void f3() {}
} 
class Program
{
    static void Main(string[] args)
    {
        baseclass b = new derived();
        b.f1 ();
        b.f2 ();
        b.f3 ();
    }
}

Answer & Solution
Correct Answer: Option B
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.