Determine current namespace

  • Thread starter Thread starter vooose
  • Start date Start date
V

vooose

Does anyone know how to determine the current namespace in code?

This appears to be necessary when you obfuscate your code and it changes
the namespace, so references to 'OldNameSpace' are now invalid. (say
when you are loading resources from a folder within the dll)
 
Seek and ye shall find...

Type type = typeof(MyClass);
string namespace = type.Namespace;
 

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

Back
Top