how to store multiple string value in one int variable
string OutReader = ConfigurationManager.AppSettings["OutReader"].ToString();
int outrdr = Convert.ToInt32(OutReader);
The value of AppSettings["OutReader"] is: "(1,2)"
If AppSettings["OutReader"] currently have in it a string like: "(1,2)"
then you can do:
var sections = ConfigurationManager.AppSettings["OutReader"].Replace("(",string.Empty)
.Replace(")",string.Empty)
.Split(',');
if(sections.Length > 0)
{
int outrdr = Convert.ToInt32(sections[0]);
}
This can still throw an exception in the case that section[0] can't be parsed into an int so use .TryParse instead - Just wanted to stay as close to the question as possible
outrdr contains the value 1 (starting from (1,2)). It is not possible to store the 2 as well in that single integer, but you can use sections[1] to access that using similar code.
outrdrhave?AppSettings["OutReader"]