You should understand that in the context of the CLR there is no such thing as a namespace. Namespaces are just a language function that exists only to simplify the code, so we donβt always have to read fully qualified class names.
In your example
namespace foo { public class bar { ... } } namespace foo.bar { public class baz : EventArgs { ... } }
when this source code is compiled, IL does not even know that there are two namespaces - foo and foo.bar. Instead, he only knows class definitions. In this case, when it gets into the class panel, it knows that you have a class called foo.bar
When it comes to the baz class, it resolves the fully qualified class name as foo.bar.baz
But if so, baz should have been fairly declared in the class definition of bar, and not in a separate namespace, as you did here.
source share