I need to use localizition for different languages in a static class, using something similar to this:
public static class ConnectivityHelper
{
const string DEFAULT_ALERT_MESSAGE = Strings.APP_DEFAULT_ALERT_MESSAGE;
public static void Run(Action action,
bool anyConnection = true,
bool shouldAlert = false,
string message = DEFAULT_ALERT_MESSAGE){}
}
The string message must be constant, the error that appears is:
Error CS0133: The expression being assigned to 'ConnectivityHelper.DEFAULT_ALERT_MESSAGE' must be constant (CS0133).
How can I resolve this?