I have a setting like this in my appSettings.config
file
<add key="logFilesLocations" value="[firstfile,secondfile]"/>
Is there any standard way to read these values as arrays directly?
I know I can play with the string after reading the value and split string to get the array, but that is ugly.
I tried this also
public static List<string> LogFilesLocations => (ConfigurationManager.AppSettings.GetValues("logFilesLocations") ?? Array.Empty<string>()).ToList();
But this actually does not return an array.