P
Peted
hello, i have a app.config file like so
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="rdbUser1Cpu1" value="Cpu1,test"/>
</appSettings>
</configuration>
I understand it is possible to have mutliple values per key that when
you use getvalues is suppoded to return a String[] but it dont seem to
work
Eg
String[] temp;
temp = ConfigurationManager.AppSettings.GetValues("rdbUser1Cpu1");
this compiles and runs fine with no errors except
it does not return a string array with 2 elements houseing each
seperate value
(What i expected was temp[0] =" Cpu1" and temp[1] = "test" )
instead it returns a single element array of "Cpu1,test1" in the first
index.
temp[0] = "Cpu1,test"
temp[1] = out of bounds index
Am i misunderstanding how it should work, or am i doing this wrong.
thanks for any help
Peted
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="rdbUser1Cpu1" value="Cpu1,test"/>
</appSettings>
</configuration>
I understand it is possible to have mutliple values per key that when
you use getvalues is suppoded to return a String[] but it dont seem to
work
Eg
String[] temp;
temp = ConfigurationManager.AppSettings.GetValues("rdbUser1Cpu1");
this compiles and runs fine with no errors except
it does not return a string array with 2 elements houseing each
seperate value
(What i expected was temp[0] =" Cpu1" and temp[1] = "test" )
instead it returns a single element array of "Cpu1,test1" in the first
index.
temp[0] = "Cpu1,test"
temp[1] = out of bounds index
Am i misunderstanding how it should work, or am i doing this wrong.
thanks for any help
Peted