It seems that the developer had a coding standard that states: "Do not use string literals in your code and dutifully separate each constant, regardless of whether it makes sense or not.
For example, there is probably some element where the code requires the number 1, and instead of using DefaultNumberOfLineItems or some other descriptive constant, they used NumberOne = 1;
Best practice would be to keep constants descriptive and close to their point of use. There is nothing wrong with a static class of related constants that have some type of value and are related to each other.
For example, there is a system in which I worked with tag attributes with unique keys. These keys are collected in a static class with descriptive attribute names; in fact, the keys are generated by an automated system
public static class AttributeIDs { public const string Name = "UniqueGeneratedKeyForNameAttribute"; public const string Description ="UnqiueGeneratedKeyForDescriptionAttribute"; ... etc. }
In practice, it is used as
MyAccess.GetValueForAttribute(AttributeIDs.Name);
which unites all related constants.
source share