By bloid
via theserverside.com
Published: Aug 01 2008 / 17:03
![]() | |
| HTML5 Canvas | |
| Written by: Simon Sarris | |
| Featured Refcardz: Top Refcardz: | |
| 150+ Refcardz Available · Get them all | |
By bloid
via theserverside.com
Published: Aug 01 2008 / 17:03
Comments
raveman replied ago:
unit testing for enums will be crazy.
sproketboy replied ago:
"Why would I want to do that?. Well, let's say we just want to."
Huh? The author provides no reason to do this except for hack effect. 22 lines of code written to subvert the type safe enum pattern and it gets 7 up votes? People - work with me here.
Instead of hacking - if you have a List of things that might be variable you might try using - say - a List? Just a suggestion.
fluminis replied ago:
I don't understand why he woud do such a thing.
By definition a Enum is something which is finite and that will not change. The developer is going to use it and this allow him not to use another value than the one define in the enum...
I can't see the point, adding a value dynamicly during at execution time.
Voters For This Link (9)
Voters Against This Link (2)