Hi I am reading the values from app.config. I have different sections as below.
<TEST>
<add key="key" value="value1" />
</TEST>
<DEV>
<add key="key" value="value1" />
</DEV>
I am accessing these values in my class files as below.
protected static NameValueCollection keyvalue = ConfigurationManager.GetSection("DEV") as NameValueCollection;
If I want to read values from 5 different classes then I have to write above code in all 5 classes and If I want to change DEV to TEST then I need to change in 5 places. Is there any way I can simplify this steps? Or Is there any best practices I can follow up? Any help would be greatly appreciated. Thank you.