namespace CompanyName
{
namespace UserInterface // nested namespace
{
public class MyClass
{
public void Test()
{
System.Console.WriteLine("UserInterface Test()");
}
}
}
}
namespace CompanyName.DatabaseAccess // nested namespace using dot
{
public class MyClass
{
public void Test()
{
System.Console.WriteLine("DatabaseAccess Test()");
}
}
}
class MainClass {
public static void Main() {
CompanyName.UserInterface.MyClass myUI = new CompanyName.UserInterface.MyClass();
CompanyName.DatabaseAccess.MyClass myDB = new CompanyName.DatabaseAccess.MyClass();
CompanyName.DatabaseAccess.MyClass myMT = new CompanyName.DatabaseAccess.MyClass();
myUI.Test();
myDB.Test();
myMT.Test();
}
}
UserInterface Test()
DatabaseAccess Test()
DatabaseAccess Test()