MCQOPTIONS
Saved Bookmarks
| 1. |
If a class named csharp is present in namespace n1 as well as in namespace n2,then which of the following is the correct way to use csharp class? a) class Program { static void Main(string[] args) { import n1; csharp x = new csharp(); x.fun(); import n2; csharp y = new csharp(); y.fun(); } } b) import n1; import n2; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { n1.csharp x = new n1.csharp(); x.fun(); import n2; n2.csharp y = new n2.csharp(); y.fun(); } } } c) class Program { static void Main(string[] args) { using n1; csharp x = new csharp(); x.fun(); using n2; csharp y = new csharp(); y.fun(); } } d) using n1; using n2; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { n1.csharp x = new n1.csharp(); x.fun(); import n2; n2.csharp y = new n2.csharp(); y.fun(); } } } |
| A. | A |
| B. | B |
| C. | C |
| D. | D |
| Answer» D. D | |