Save settings – with a class that reads from or saves to app.config or web.config

Step 1: Add reference to System.Configuration

Step 2 :Derive your class from ConfigurationSection

Step 3 : Put your values to be retrieved with ConfigurationProperty attribute

Step 4: add a section to your config file and an entry

Step 5 : read with ConfigurationManager.GetSection and convert to your class

Download code

See video