One of my classes, to execute some instructions needs to know its location (as an absolute path). I was using a naive Directory.GetCurrentDirectory(), until I noticed that things get messed up when the user is actually not executing from the directory where the class is sitting.
How can I get that ? So far my googling is unfructuous… 🙁
PS : I intend to release this class as a DLL, no COM or anything fancy, just a basic DLL. Will that change any rule?
You can use:
(Assuming you only have one module, which is likely.)