How to read appSettings section from App.Config?
Posted on 2010-08-16
I have the below App.Config file in my project.
<?xml version="1.0" encoding="utf-8" ?>
<add key="Xml" value="C:\Files\ins.xml"/>
I am trying to get the value of key "Xml" as follows.
string xmlFile = "";
xmlFile = ConfigurationSettings.AppSettings["Xml"];
But it is not showing the value when I tried to show the value in a messagebox.
I also imported the namespace "System.Collections.Specialized" still not working.
Any ideas please?