Since C# now supports using static System.String;
to get to the string static classes, we can now use this to create global constants.
So now you can do something like:
namespace MyCommonNamespace
{
public static class GlobalConstants
{
public const string MyConstant = "Some String Value";
}
}
To use, just add the following to your using collection:
using static MyCommonNamespace.GlobalConstants;
Now you can use the following inside of your code:
var LocalVariable = MyConstant;