Menu

#11 Default values not empty attributes

v1.5
open
Output (5)
5
2009-04-23
2009-04-23
WebGear Ltd
No

If a property was recognized as, say, Int32, then it will fail on Parse if the value was an empty string at runtime.
Add an option to return a default value instead.
Sample config:
/defaults - will default Int/Decimal to 0, DateTime to DateTime.Min and Boolean to false.
/defaults:i:-1 - will default Int32 to -1, and the rest to defaults above.
/defaultsFromValues - read default values to return from config at the time of generation.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.