Click here to Skip to main content
15,898,134 members
Home / Discussions / C#
   

C#

 
GeneralRe: AutoUpdate package? Pin
Arun Bhalla20-May-03 9:04
Arun Bhalla20-May-03 9:04 
GeneralUser control in C# Pin
hvjahagirdar19-May-03 18:47
hvjahagirdar19-May-03 18:47 
GeneralRe: User control in C# Pin
Bo Hunter20-May-03 1:36
Bo Hunter20-May-03 1:36 
GeneralC# Controls question Pin
phaedrus19-May-03 18:33
phaedrus19-May-03 18:33 
QuestionHow to save a form to a bmp? Pin
xfqiu19-May-03 18:00
xfqiu19-May-03 18:00 
AnswerRe: How to save a form to a bmp? Pin
Bo Hunter20-May-03 1:42
Bo Hunter20-May-03 1:42 
AnswerRe: How to save a form to a bmp? Pin
Philip Fitzsimons20-May-03 3:37
Philip Fitzsimons20-May-03 3:37 
GeneralUnderstanding ConfigurationSettings Pin
Neil Lamka19-May-03 14:24
Neil Lamka19-May-03 14:24 
Ok, so I know I'm missing something very basic here but I am having a problem understanding how ConfigurationSettings work. I've looked at the various examples but still can't get it to work for me.

I have a Windows application ... application name testapp. I've created a configuration file named testapp.exe.config and copied the file into (in this case) the bin\debug directory along with the EXE file. The config file looks like the following... copied from one of the examples:

<?xml version="1.0" encoding="UTF-8" ?>
<configuration>

<!-- The following code uses the predefined appSettings section. -->
<appSettings>
<add key="Application Name" value="test application name" />
</appSettings>

</configuration>


In my code I have the following statement.

string appName = ConfigurationSettings.AppSettings["Application Name"];

What I get is appName = null and the config file is removed form the debug\bin directory.

So, 1st, should the config file be being deleted..if so, are the actual settings stored someplace? and 2nd, what am I missing by not being able to read the value for "Application Name" give the above code and config file.

Thanks for the help


Neil Lamka
neil@meetingworks.com
GeneralRe: Understanding ConfigurationSettings Pin
Andres Manggini19-May-03 18:29
Andres Manggini19-May-03 18:29 
GeneralRe: Understanding ConfigurationSettings Pin
Ranjan Banerji20-May-03 3:37
Ranjan Banerji20-May-03 3:37 
GeneralSingle Dll Compile Pin
Mark Sanders19-May-03 8:34
Mark Sanders19-May-03 8:34 
GeneralRe: Single Dll Compile Pin
Daniel Turini19-May-03 9:44
Daniel Turini19-May-03 9:44 
GeneralRe: Single Dll Compile Pin
leppie20-May-03 8:16
leppie20-May-03 8:16 
Questionchanging font/color of tabpage label text..?? Pin
vlusardi19-May-03 7:56
vlusardi19-May-03 7:56 
GeneralDisplay a webpage in a form Pin
Emilio Guijarro19-May-03 6:51
Emilio Guijarro19-May-03 6:51 
GeneralRe: Display a webpage in a form Pin
benzite19-May-03 23:56
benzite19-May-03 23:56 
GeneralSkins Pin
RB@Emphasys19-May-03 3:37
RB@Emphasys19-May-03 3:37 
GeneralRe: Skins Pin
MrEyes19-May-03 4:57
MrEyes19-May-03 4:57 
GeneralRe: Skins Pin
RB@Emphasys19-May-03 6:34
RB@Emphasys19-May-03 6:34 
GeneralUserdefined messages Pin
Kannan Kalyanaraman19-May-03 0:26
Kannan Kalyanaraman19-May-03 0:26 
GeneralRe: Userdefined messages Pin
Bo Hunter20-May-03 1:40
Bo Hunter20-May-03 1:40 
GeneralRe: Userdefined messages Pin
Kannan Kalyanaraman20-May-03 1:43
Kannan Kalyanaraman20-May-03 1:43 
GeneralRe: Userdefined messages Pin
Bo Hunter20-May-03 1:50
Bo Hunter20-May-03 1:50 
GeneralRe: Userdefined messages Pin
Kannan Kalyanaraman20-May-03 2:03
Kannan Kalyanaraman20-May-03 2:03 
GeneralPreviewControl - How to play Audio/Video files in C# Pin
Jonas Follesø18-May-03 23:15
Jonas Follesø18-May-03 23:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.