Eric Gunnerson discusses Enums, Validation and Versioning…


Giving us an early peek at his TechEd 2004 talk, Eric discusses how to handle enums in your code, since they are not constrained to the list of options you define in the enum and also because they can change in ways that could break your code in the future…

Enums and validation
 … So, my first point is that enums are not sets – they can take on any value from the underlying type.  …

Comments (1)

  1. 仪表 says:

    This is another stupid one without a reason. The limit on a function size is recommended only for the readability since we are in 21st century with bigger better monitors the 25 lines or for that matter 50 lines does not make any sense at all.

    But it is recommended to keep the function size to be "one screenful" whatever it might be in your case. So that the guy who is trying to understand does not have to go up and down and forget everything in the middle.