Use the latter, but with a slight modification:
public static class CommonStrings
{
public const string MyString = "My string here";
}
In another note, “global” variables have been branded to be bad practice, but in this case, in my opinion, the common container for reusable strings is preferred; I would not do everything that you want to use publicly available, especially if they are not permanent.
source
share