For integers, I found the following method faster.
First of all, create the appSettings key with integer values separated by commas in your app.config.
<add key="myIntArray" value="1,2,3,4" />
Then split and convert the values to an int array using LINQ
int[] myIntArray = ConfigurationManager.AppSettings["myIntArray"].Split(',').Select(n => Convert.ToInt32(n)).ToArray();
akd Jan 15 '15 at 10:54 2015-01-15 10:54
source share