using System.Collections.Generic;
using System.Text;
using System.Configuration;
namespace ConsoleApplication111
{
class Program
{
static void Main(string[] args)
{
//System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal);
//Console.WriteLine(config.Sections["Foo"]);
String foo = ConfigurationManager.AppSettings["Test"];
Console.WriteLine(foo);
}
}
}
?
I have been trying to read from the XML abd print to the screen but havent been able to do so can you help???
Ryan AlfordPosted Jun 6, 2008, 12:21 PM
string foo = ConfigurationSettings.AppSettings.Get("Test");
george senikosPosted Jun 6, 2008, 11:52 AM
Ryan AlfordPosted Jun 6, 2008, 11:41 AM
george senikosPosted Jun 6, 2008, 10:51 AM
Jan MontanoPosted Jun 5, 2008, 10:40 PM
If it's a typo error, in your c# project, is the config file's name App.config?
besides that, I can't see anything wrong with what you're doing.
or perhaps you just need a Console.Read(); statement at the end of your code to see the printing on the screen.