Hi,
I have a windows application where many parameters are supplied through app.config file.
<add key="DB1" value=".DB1RecordSet" />
<add key="DB2" value=".DB2RecordSet" />
<add key="DB3" value=".DB3RecordSet" />
These database parameters are supplied to the .cs file where comparison is made like which DB is being is used :
if ((line.ToUpper().Contains(ConfigurationManager.AppSettings["DB1"].ToUpper())
|| line.ToUpper().Contains(ConfigurationManager.AppSettings["DB2"].ToUpper())
|| line.ToUpper().Contains(ConfigurationManager.AppSettings["DB3"].ToUpper()))))
{
// code
}
My problem here is that i have to add a new key-value DB component in app.config whenever a new requirement is there and then change in the .cs ...
Go to the complete details ...