Question: If a class called Point is present in namespace n1 as well as in namespace n2 , then which of the following is the correct way to use the Point class?

Options

A : namespace IndiabixConsoleApplication { class MyProgram { static void Main(string[] args) { import n1; Point x = new Point(); x.fun(); import n2; Point y = new Point(); y.fun(); } } }

B : import n1; import n2; namespace IndiabixConsoleApplication { class MyProgram { static void Main(string[] args) { n1.Point x = new n1.Point(); x.fun(); n2.Point y = new n2.Point(); y.fun(); } } }

C : namespace IndiabixConsoleApplication { class MyProgram { static void Main( string [] args) { using n1; Point x = new Point(); x.fun(); using n2; Point y = new Point(); y.fun(); } } }

D : using n1; using n2; namespace IndiabixConsoleApplication { class MyProgram { static void Main( string [] args) { n1.Point x = new n1.Point(); x.fun(); n2.Point y = new n2.Point(); y.fun(); } } }

Click to view Correct Answer

Previous || Next

Namespaces - General Questions more questions

If a namespace is present in a library then which....

Which of the following is NOT a namespace in the....

Which of the following statments are the correct way to....

Which of the following statements is correct about a namespace....

Which of the following is absolutely neccessary to use a....

Which of the followings are NOT a .NET namespace?

Which of the following statements is correct about namespaces in....

Which of the following is correct way to rewrite the....

Which of the following statements is correct about the using....

Which of the following statements are correct about a namespace....

Attributes - General Questions more Online Exam Quiz

Exception Handling - General Questions

Functions and Subroutines - General Questions

Inheritance - General Questions

Interfaces - General Questions

Operators - General Questions

Polymorphism - General Questions

Properties - General Questions

Structures - General Questions

Advanced SQL - General Questions