M
Michi
There appears to be no way to anchor a qualifed name at
the global scope. Consider:
namespace foo
{
class System
{
public static void op() {}
}
class bar
{
bar()
{
foo.System.op(); // Fine
System.Console.Writeline("Hello"); // Error
}
}
}
The compiler complains that foo.System does not contain a
definition for Console. Looking through the doc, I cannot
find a way to anchor a qualified name at the global scope
and, due to name hiding, in the scope of bar(), "System"
always refers to foo.System instead of the global System
namespace.
I'm looking for a generic solution to this problem,
rather than a specific one: the problem arises in the
context of a CORBA-like system where an interface
definition language is mapped to various implementation
languages. To the interface definition language, "System"
has no special meaning, yet the generated code must avoid
name clashes of this kind.
Thanks,
Michi.
the global scope. Consider:
namespace foo
{
class System
{
public static void op() {}
}
class bar
{
bar()
{
foo.System.op(); // Fine
System.Console.Writeline("Hello"); // Error
}
}
}
The compiler complains that foo.System does not contain a
definition for Console. Looking through the doc, I cannot
find a way to anchor a qualified name at the global scope
and, due to name hiding, in the scope of bar(), "System"
always refers to foo.System instead of the global System
namespace.
I'm looking for a generic solution to this problem,
rather than a specific one: the problem arises in the
context of a CORBA-like system where an interface
definition language is mapped to various implementation
languages. To the interface definition language, "System"
has no special meaning, yet the generated code must avoid
name clashes of this kind.
Thanks,
Michi.