A look at how constants work in the .NET Framework
What is const?
When a variable is marked as
const, its value cannot change.
const int BoilingTempCelcius = 100;
A constant must be determinable at compile time, which means only the primitive types (
stringetc) can be marked as const.
However, C# lets you declare a non-primitive type as