When using DLLImport to load a dll is there a way to pass it a string variable instead of a constant. I tried giving it a string variable and it will throw a exception saying it needs a constant expression, typeof expression or a array expression. The reason I am asking this question is because I would like to change the location from a dll by a database setting so If I need to change it, I wont have to change the code and rerelease it. I'm using cSharp and .net.