[.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,...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: VB.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1068 | Hits: 24

Similar Posts

  • Filtering with string parameter that allows free user input more
  • LINQ Tip of the week: System.String support more
  • Validation - Part 2 - Client-Side more
  • Validation - Part 1 - Getting Started more
  • ORM Release History : Q1 2009 SP1 (version 2009.1.405.1) more
  • XML serialization using generics more
  • Using Enums in List Controls more
  • Null Object design pattern instead of returning null more
  • Back to CSV - Convert CSV text to Objects; via JSON more
  • Render Control as String more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD