Home » C# Programming » Inheritance

Which of the following statements should be added to the subroutine fun( ) if the C#.NET code snippet given below is to output 9 13? class BaseClass { protected int i = 13; } class Derived: BaseClass { int i = 9; public void fun() { // [*** Add statement here ***] } }

Correct Answer: Console.WriteLine(i + " " + base.i);

← Previous Question Next Question→

More Questions from Inheritance

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion