S
Sledgehammer777
I have an issue that I'd like some oone to explain to me. In a C# DLL
I have a several const strings defined as such:
namespace ns
{
public class strings
{
public const string string1 = "XYZ";
public const string string2 = "ABC";
}
}
Now, in another file I have some code like this:
string code = ns.strings.string1;
Now when I compile my code and then disassemble it I see this:
string code = "XYZ";
I understand the compiler could change the reference to the literal
for optimization purposes but the problem then occurs when I change
the code in the DLL and deploy the DLL without recompiling the app,
the change is not picked up in the app because the reference is lost.
Is this by design and is there a way around it?
I have a several const strings defined as such:
namespace ns
{
public class strings
{
public const string string1 = "XYZ";
public const string string2 = "ABC";
}
}
Now, in another file I have some code like this:
string code = ns.strings.string1;
Now when I compile my code and then disassemble it I see this:
string code = "XYZ";
I understand the compiler could change the reference to the literal
for optimization purposes but the problem then occurs when I change
the code in the DLL and deploy the DLL without recompiling the app,
the change is not picked up in the app because the reference is lost.
Is this by design and is there a way around it?