MCQOPTIONS
Saved Bookmarks
| 1. |
Trace the outputnamespace A{class MyClass{public void fun(){Console.WriteLine( " C # is fun " );}}namespace B{class MyClass{public void fun(){Console.WriteLine( " C # is interesting " );}}}}Consider the above code what will be the output of following programclass Program{static void Main(string[] args){A.B.MyClass obj = new A.B.MyClass();obj.fun();}} |
| A. | C # is interesting |
| B. | C # is fun |
| C. | compile time error |
| D. | None of the above |
| Answer» B. C # is fun | |