The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

    • RT @SwiftOnSecurity: To be fair, anyone who's tried to use VMware's website would probably rather see it deleted 49 minutes ago
    • RT @mmeeuw: “Je mag Joost Eerdmans niet vergelijken Anton Mussert en JoostAnnabel21 niet met de NSB, daar kunnen ze niet tegen, dan worden… 50 minutes ago
    • RT @roosvonk: Omdat enkele fabrieken van Tatasteel zo verouderd zijn dat ze extra veel vervuilen, hoeven ze niet te voldoen aan de strenge… 55 minutes ago
    • RT @zaagvis: Mijn moestuin is een kilometer van huis en ja ik ga altijd met de auto omdat ik zoveel mee moet slepen, nu dacht ik, als ik ee… 56 minutes ago
    • @Suuzer83 War heftig. Ik duim dat het stopt en wns je veel sterkte. 🤗 59 minutes ago
  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,733 other followers

Archive for April 18th, 2012

.NET/C#: Way overdue post – the syntax inside the Obsolete attribute; Looking for the new ConfigurationManager? (via: @ScottCate Blog Moved ….)

Posted by jpluimers on 2012/04/18

Everytime I get a warning like

Warning 1 'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete, it has been replaced by ConfigurationManager.AppSettings'

it reminds me I should have written a blog post about it, as the solution is a tiny bit more than just replacing System.Configuration.ConfigurationSettings.AppSettings by System.Configuration.ConfigurationManager.AppSettings.

Scott Gate wrote a nice post on his old blog about this (his new blog is awesome, he really should import his old posts into his new blog) that explains how to solve this well, so below is an elaboration on the how of the change, a tiny trick and a short series of steps to resolve this warning.

First of all, the above message means you are touching code that has been written in the .NET 1.x era, and the maintaining people (you! <g>) have been too lazy to solve the warning. That is bad, as your code should compile without warnings, and preferably without hints too. Read the rest of this entry »

Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, Development, Software Development | Leave a Comment »

 
%d bloggers like this: