Jak korzystać z ConfigurationManager.AppSettings z sekcją niestandardową?
Muszę dostaćhttp://example.com„z użycia pliku App.config.
Ale w tej chwili używam:
string peopleXMLPath = ConfigurationManager.AppSettings["server"];
Nie mogę uzyskać wartości.
Czy możesz wskazać, co robię źle?
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configSections>
<section name="device" type="System.Configuration.SingleTagSectionHandler" />
<section name="server" type="System.Configuration.SingleTagSectionHandler" />
</configSections>
<device id="1" description="petras room" location="" mall="" />
<server url="http://example.com" />
</configuration>