Default Project Namespace

T

Tank

How do I get the default namespace of aproject programatically ? The idea is
to not hardcode the default namespace when accessing embedded resources in
the project. For example,

assembly.GetManifestResourceStream("MyNameSpace.testFile.rtf"));

MyNameSpace if the default namesapce. I would like to have something like
this:

assembly.GetManifestResourceStream(GetDefaultNameSpace()+"testFile.rtf"));

Thanks.
 
S

sandman

What about using the Registry instead? It's not as elegant a solution
as you mentioned but at least it's not hard-coded.
 
N

Norfy

Have you looked at:

assembly.GetManifestResourceStream(GetType(), "testFile.rtf")); ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Default Project Namespace 3
Namespace confusion 1
Namespace question 2
Resources 6
Default namespace confusion 2
Loading Embedded Resources 5
How to create project w/o a namespace 7
Namespace 2

Top