Click here to Skip to main content
15,888,908 members
Home / Discussions / C#
   

C#

 
GeneralRe: Generic Collection in C# Pin
King Julien6-Apr-09 1:03
King Julien6-Apr-09 1:03 
AnswerMessage Removed Pin
6-Apr-09 3:24
professionalN_tro_P6-Apr-09 3:24 
GeneralRe: Generic Collection in C# Pin
Colin Angus Mackay6-Apr-09 4:54
Colin Angus Mackay6-Apr-09 4:54 
GeneralMessage Removed Pin
6-Apr-09 5:04
professionalN_tro_P6-Apr-09 5:04 
GeneralRe: Generic Collection in C# Pin
S. Senthil Kumar6-Apr-09 5:14
S. Senthil Kumar6-Apr-09 5:14 
GeneralRe: Generic Collection in C# Pin
Colin Angus Mackay6-Apr-09 6:18
Colin Angus Mackay6-Apr-09 6:18 
GeneralRe: Generic Collection in C# Pin
jschell6-Apr-09 8:24
jschell6-Apr-09 8:24 
QuestionApp Settings Confusion - Class Library Pin
Jasmine Pomelo6-Apr-09 0:42
Jasmine Pomelo6-Apr-09 0:42 
Hi,

I'm a bit confused about how to use application settings in a C# .NET 2.0 application.

I have one project which is a console app and in that I have an App.config file with a couple of settings in it. My console app can access these settings using ConfigurationManager.AppSettings[<key name>] with no problems.

I've created a separate class library project, added a reference to it in my console application. I added a web service reference in my class library and a file, app.config has been automatically created which stores my web reference. However, in that file, there's no <appsettings> key, only an <applicationsettings> key.

I've tried using the the following syntax to allow my class library code to access the settings specific to the class library.

<setting name="MySetting" serializeAs="String">
<value>MyValue</value>
</setting>

...and...

<add key="MySetting" value="MyValue" />

Neither of these work, and I've just noticed that in my class library, there's also a Settings.settings item under the project Properties. I've tried setting the keys in there and still can't access them from my class library.

Any suggestions?
AnswerRe: App Settings Confusion - Class Library Pin
William Ten Broek6-Apr-09 1:15
William Ten Broek6-Apr-09 1:15 
GeneralRe: App Settings Confusion - Class Library Pin
Jasmine Pomelo6-Apr-09 5:44
Jasmine Pomelo6-Apr-09 5:44 
QuestionOpen word document in seprate window Pin
amit_836-Apr-09 0:40
professionalamit_836-Apr-09 0:40 
AnswerRe: Open word document in seprate window Pin
King Julien6-Apr-09 2:10
King Julien6-Apr-09 2:10 
QuestionSending sms through .Net C# Windows Application Pin
Milind Panchal6-Apr-09 0:22
Milind Panchal6-Apr-09 0:22 
AnswerRe: Sending sms through .Net C# Windows Application Pin
stancrm6-Apr-09 0:41
stancrm6-Apr-09 0:41 
AnswerRe: Sending sms through .Net C# Windows Application Pin
King Julien6-Apr-09 0:58
King Julien6-Apr-09 0:58 
AnswerRe: Sending sms through .Net C# Windows Application Pin
thowra6-Apr-09 5:50
thowra6-Apr-09 5:50 
Questionlz77 decompression in c# (some body help me please) Pin
novhard6-Apr-09 0:07
novhard6-Apr-09 0:07 
AnswerRe: lz77 decompression in c# (some body help me please) Pin
Henry Minute6-Apr-09 1:27
Henry Minute6-Apr-09 1:27 
GeneralRe: lz77 decompression in c# (some body help me please) Pin
novhard6-Apr-09 19:07
novhard6-Apr-09 19:07 
GeneralRe: lz77 decompression in c# (some body help me please) Pin
Henry Minute7-Apr-09 0:47
Henry Minute7-Apr-09 0:47 
QuestionGarbage Collection in C#. Pin
Ashwani Dhiman5-Apr-09 23:38
Ashwani Dhiman5-Apr-09 23:38 
AnswerRe: Garbage Collection in C#. Pin
CPallini5-Apr-09 23:47
mveCPallini5-Apr-09 23:47 
AnswerRe: Garbage Collection in C#. [modified] Pin
akhilonly0075-Apr-09 23:47
akhilonly0075-Apr-09 23:47 
GeneralRe: Garbage Collection in C#. Pin
Colin Angus Mackay5-Apr-09 23:50
Colin Angus Mackay5-Apr-09 23:50 
GeneralRe: Garbage Collection in C#. Pin
akhilonly0076-Apr-09 0:04
akhilonly0076-Apr-09 0:04 

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.