i want save Comname in a variable
Know the answer? Post it — somebody with the same question will find it here. Sign in to answer this question It is the same account you read, post and publish with — and you will come straight back to this page.5 Replies
Aman GuptaPosted Jul 4, 2022, 9:56 AM
Sachin SinghPosted Jun 21, 2022, 5:16 AM
Amit MohantyPosted Jun 21, 2022, 4:35 AM
using System.Configuration;
Jaydeep PatilPosted Jun 21, 2022, 4:04 AM
Hi,
Try this solution
List values = new List();
foreach (string key in ConfigurationManager.AppSettings)
{
if (key.StartsWith("KeyName"))
{
string value = ConfigurationManager.AppSettings[key];
values.Add(value);
}
}
string[] repositoryUrls = values.ToArray();
Jignesh KumarPosted Jun 21, 2022, 3:40 AM