configuration manager question

Jun 5 2008 8:15 PM
using System;

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);

}

}

}


?<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<configSections>

</configSections>

<appSettings>

<add key="Test" value="hello"/>

</appSettings>

</configuration>

I have been trying to read from the XML abd print to the screen but havent been able to do so can you help???

Answers (5)