Exceptional Descriptions
by in CodeSOD on 2023-05-31"The Colonial" was trawling through some code they inherited, and found this approach to doing exceptions in C#:
public enum ReturnCode : int
{
Success = 0,
Enum1 = 100,
Enum2 = 110,
// *snip* - LOTS of enums
// .
// .
UnknownError = 998,
Exception = 999
};