CSharp - Namespace Name scoping

Introduction

Names declared in outer namespaces can be used unqualified within inner namespaces.

In this example, Class1 does not need qualification within Inner:

namespace Outer
{
       class Class1 {}

       namespace Inner
       {
         class Class2 : Class1  {}
       }
}

To refer to a type in a different branch of your namespace hierarchy, use a partially qualified name.

In the following example, we base Class2 on Common.Class1:

namespace Outer
{
       namespace Common
       {
           class Class1 {}
       }
       namespace Second1
       {
           class Class2 : Common.Class1  {}
       }
}