In this Blog post I am going to write how to define Custom Configuration section in .NET Apps either App.Config or Web.config and how to use it our programs
Here are the Steps we need to perform
1) First Create the class which is derived from ConfigurationSection this class resides inside System.Configuration Namespace.
2) Next we need Define Our custom configuration section in our App.config or Web.Config file. for example here is my custom configuration looks like .
3) Next we need to create two more classes which Reads our configuration Key and Key collection
Here Key are Name and Value
Next we need to Read Key collection so here is how the class for that
Here we are creating Indexer to store key collection as object.
Here is how we use it our program