I'l all for all cups for constants, however standards where I work demand pascal casing for constants (for some made-up b.s reason), so I got used to it...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Coming from C/C++, I'd go for option 2 but in all caps to show at a glance that it's a hardcoded value. Not sure if that's also a convention in C#.
const int CORRECT_TYPE = 2;
return inputType == CORRECT_TYPE;
I'l all for all cups for constants, however standards where I work demand pascal casing for constants (for some made-up b.s reason), so I got used to it...