Namespace constant in C#
- by pm_2
Is there any way to define a contsant variable for an entire namespace, rather than just within a class? For example:
namespace MyNamespace
{
public const string MY_CONST = "Test";
static class Program
{
}
}
Gives a compile error as follows:
Expected class, delegate, enum, interface, or struct