[.NET Gotcha] SettingsPropertyValue typed as a string will never be null
Posted by: JonGalloway.ToString(),
on 05 Oct 2006 |
View original | Bookmarked: 0 time(s)
I like to use chained null coalesce operators (??) to handle default console application parameters. The idea is that I provide a default value, override it via application settings (app.config and user.config), and then overridede it with command-line arguments. I think it provides for a nice user experience - if you're always going to to run the application with the same settings, you can set them in the config; if you need to script it you can control everything from the command-line. Unfortunately,...