Well, let’s first talk about the right way to get configuration settings for your application (or a Web application). The settings are usually stored in the file named Web.config (for Web applications and Web services) or App.config (which is named app.config in your source code project and is given a name derived from the name of your program after the compilation).
You can use the class System.Configuration.ConfigurationSettings (in .NET 2.0) or System.Configuration.ConfigurationManager (.NET 3.0 and later) to get the application settings, for example:
using System.Configuration;
...
string version = ConfigurationManager.AppSettings[ "version" ];
And you can use System.Web.Configuration.WebConfigurationManager to get your web.config settings:
using System.Web.Configuration;
...
string version = WebConfigurationManager.AppSettings[ "version" ];
Are you still with me? Why am I writing about this trivial stuff that you can easily find on MSDN (http://msdn.microsoft.com/en-us/library/default.aspx)? Because I’ve seen a less boring way to do the same things. You find the file, open it, parse it (you write your own XML parser to do that), and find the element that contains the setting you are looking for. Don’t forget to close the file.
With each new technology, developers find new ways to break the KISS (keep it simple, stupid) principle.