Hi
I have a problem with fully qualified names. According to the C#
language specification:
"Every namespace and type has a fully qualified name, which uniquely
identifies the namespace or type amongst all others."
However, I have problems compiling the following:
namespace Foo.System.Bar
{
class Program
{
static void Main(string[] args)
{
System.Console.WriteLine("Hello, World");
}
}
}
With compiler output:
"The type or namespace name 'Console' does not exist in the namespace
'Foo.System' (are you missing an assembly reference?)"
Changing the namespace name from "Foo.System.Bar" to "Foo.Sys.Bar"
solves
the problem so I guess it has to do with the rules for resolving types
(they are rather unclear in the language spec.).
The bottom line is that I'm unable to access System.Console in my
program
even when using the fully qualified name. I wonder if this is a
compiler
bug or expected behaviour?
/fc2