MCQOPTIONS
Saved Bookmarks
| 1. |
What will be the output for the given set of code? class a { public void fun() { Console.WriteLine("base method"); } } class b: a { public new void fun() { Console.WriteLine(" derived method "); } } class Program { static void Main(string[] args) { b k = new b(); k.fun(); Console.ReadLine(); } } |
| A. | Base method |
| B. | Derived method |
| C. | Code runs successfully prints nothing |
| D. | Compile time error |
| Answer» C. Code runs successfully prints nothing | |