C#.NET — handling type name conflicts when Point class exists in both n1 and n2 namespaces.

Difficulty: Medium

Correct Answer: using n1; using n2; then use n1.Point and n2.Point explicitly.

Explanation:


Fact:
When two namespaces contain the same class name, you must qualify with the namespace to disambiguate. Both using directives can be present, but class references must be fully qualified.



Final Answer:
using n1; using n2; then use n1.Point and n2.Point explicitly.

Discussion & Comments

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