Skip to main content

Posts

Showing posts from September, 2008

How to use a custom config file?

Recently I was wondering how to use custom configuration files in my application. So here it is all about custom configuration file First of all let me clarify what I mean by custom configuration files? For me it was simply about using customfile.config instead of the usual app.config and or web.config. In-order to use customfile.config instead of app.config in an application lets create a simple console application. After you have created a simple console application right click the project in solution explorer window and click add new item. From the list of options available select the Application Configuration File. Now rename the app.config name to customfile.config and click ok. Open the customfile.config. <?xml version="1.0" encoding="utf-8" ?> <configuration> </configuration> Lets add some configuration elements that are most common to our config files. <?xml version="1.0" encoding="utf-8" ?> ...