using System;
namespace Counter {
class MyClass {
public MyClass(){
Console.WriteLine("Counter1 namespace.");
}
}
}
namespace Counter2 {
class MyClass {
public MyClass() {
Console.WriteLine("Counter2 namespace.");
}
}
}
class MainClass {
public static void Main() {
// This is CountDown in the Counter namespace.
Counter.MyClass m1 = new Counter.MyClass();
// This is CountDown in the default namespace.
Counter2.MyClass m2 = new Counter2.MyClass();
}
}
|