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;
 
Back
Top