const

A C# field whose value is fixed at compile time and can never change, such as public const string SectionName = "Catalog".

In more detail

The compiler copies a const value into every place that uses it. Using a named constant instead of repeating a string literal means a typo becomes a compile error.

Related terms

Taught in

References