How to retrieve the directory in which the current class/dll is located in C#?
<p>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.</p>

<p>How can I get that ? So far my googling is unfructuous... :(</p>

<p>PS : I intend to release this class as a DLL, no COM or anything fancy, just a basic DLL. Will that change any rule?</p>
