'CompanyName.Foo' is a 'namespace' but is used like a 'type'
问题 Restatement of the question I'm resurrecting this question because I just ran into this error again today, and I'm still utterly confused why the C# compiler bothers to check for collisions between namespaces and types in contexts where it makes no sense for a namespace to exist. If I have... public Foo MyFoo { get; set; } ...why would the compiler care that Foo is both a namespace and a type? Can you declare a property as a namespace instead of a type? What is the logic behind the "namespace