also... :-)
Matt Berther <mberther@hotmail.com> wrote in message news:<ePGI6BCoEHA.1776@TK2MSFTNGP14.phx.gbl>...
> Hello Tal,
>
> Why would you use AppSettingsReader instead of ConfigurationSettings.AppSettings?
>
> --
> Matt Berther
>
http://www.mattberther.com >
> > hi
> >
> > you can use the App.Config file. if you don'a have it yet on your
> > project,
> > then, right click the project in the solution explorer->add new item->
> > choose 'Application Configuration'.
> > then edit it to something like:
> > <?xml version="1.0" encoding="utf-8" ?>
> > <configuration>
> >
> > <appSettings>
> >
> > <add key="MyKey" value="MyData" />
> >
> > </appSettings>
> >
> > </configuration>
> >
> > and then you can access the data in the code by using: using
> > System.Configuration;
> >
> > AppSettingsReader appSettings = new AppSettingsReader();
> >
> > objetc = appSettings.GetValue("MyKey",typeof(System.String));
> >
> > hope that will help
> >
> > Tal Sharfi
> >
> > "Novice" <6tc1ATqlinkDOTqueensuDOTca> wrote in message
> > news:1524CEA0-B8E0-4B94-86C5-B8D6C7286586@microsoft.com...
> >
> >> Hey everyone - is there a file in a windows application that is
> >> analogous
> >> to
> >> the web.config in ASP.NET applications?
> >> Basically, I want to store a bunch of strings (that are NOT
> >> confidential)
> >> in
> >> a common configuration file and that I can easily access like the
> >> web.config
> >> file for ASP.NET applications.
> >> In summary I would like a place to store configuration information
> >> for a windows application and the methods I use to access that
> >> information.
> >>
> >> Thanks,