"Sharon" <Sh*****@newsgroups.nospamwrote in message
news:92**********************************@microsof t.com...
How can I get the default namespace of my executable assembly at runtime?
An assembly does not have a default namespace. It can contain several
classes in several namespaces, and none of them is "default".
When you are programming in Visual Studio, the project has a "default
namespace" which determines the namespace that will be written into the
source code when you add a new class to the project. As far as I know, this
"default" of the project does not get compiled into the assembly. If you do
not change any of the properties of the project in Visual Studio, this
default namespace happens to be the same as the name of the assembly. You
could get that at runtime through Assembly.GetExecutingAssembly().