I have a resource file where I am storing connection string etc for a class library (I cant use an App.config, don't ask why). It was my assumption (might be a stupid one) that I would be able to modify the .rex file out side of the complied assembly at runtime to be able to change connection string through environments without recompiling the assembly each time, can someone verify my assumption and i开发者_JAVA技巧f possible tell me how to do it?
Cheers
You can disassemble assembly, edit resources and assemble it again.
You can find some info here.
If it's a text resource, you may try to just replace the characters.
I have successfully modified a SQL query which was included in .EXE assembly with Notepad++. I made sure though, that the number of characters was not altered.
精彩评论