using System;
namespace NS1 {
class ClassA {
public ClassA() {
Console.WriteLine("constructing ClassA");
}
}
namespace NS2 { // a nested namespace
class ClassB {
public ClassB() {
Console.WriteLine("constructing ClassB");
}
}
}
}
class MainClass {
public static void Main() {
NS1.ClassA a = new NS1.ClassA();
NS1.NS2.ClassB b = new NS1.NS2.ClassB();
}
}
constructing ClassA
constructing ClassB