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???

Jan MontanoRank #1,295 · 1.3K reputationPosted Jun 5, 2008, 6:40 PM EDT
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.
george senikos5 reputationPosted Jun 6, 2008, 6:51 AM EDT
Ryan AlfordRank #1,411 · 1.2K reputationPosted Jun 6, 2008, 7:41 AM EDT
george senikos5 reputationPosted Jun 6, 2008, 7:52 AM EDT
Ryan AlfordRank #1,411 · 1.2K reputationPosted Jun 6, 2008, 8:21 AM EDT
string foo = ConfigurationSettings.AppSettings.Get("Test");