Assuming I have this function:
public string GenerateHash(string[] values)
{
var secureSecret = "a secret string"; //<-- this can/should be const
var str = new StringBuilder(secureSecret);
foreach (var value in values) {
str.Append(value);
}
return GenerateMd5Hash(str.ToString());
}
Clearly the secureSecret above can be const, should I bother changing this to const or the compiler is smart enough to know this?