J
Jet Leung
Hi all,
I had written a codes like this:
// my code 1
string a;
System.Configuration.AppSettingsReader AppReader=new AppSettingsReader();
a=AppReader.GetValue("my_key",typeof(string)).toString();
// my code 2
string b;
b=System.Configuration.ConfigurationSettings.AppSettings["my_key"].toString(
);
And I can get the same result from a and b. Actually I want to know what is
the different between AppSettingsReader and
ConfigurationSettings.AppSettings["key"] to get the value from the
app.config?
Thank you.
I had written a codes like this:
// my code 1
string a;
System.Configuration.AppSettingsReader AppReader=new AppSettingsReader();
a=AppReader.GetValue("my_key",typeof(string)).toString();
// my code 2
string b;
b=System.Configuration.ConfigurationSettings.AppSettings["my_key"].toString(
);
And I can get the same result from a and b. Actually I want to know what is
the different between AppSettingsReader and
ConfigurationSettings.AppSettings["key"] to get the value from the
app.config?
Thank you.