[Mono-list] Using System.Config.AppSettingsReader
Petit Eric
surfzoid at gmail.com
Wed Nov 11 09:37:33 EST 2009
I used it at begining of .Net but had so many trouble and problem,
then i finally use and modify this very good class of LEBRUN Thomas :
http://monoosc.svn.sourceforge.net/viewvc/monoosc/MonoOSC/MonoOSC/Class/ConfigReaderWriter.cs?revision=200&view=markup
This one can work with an existing App.config generated by the Framework
2009/11/11 Daniel Soto <daniel.soto2k at gmail.com>:
> Hello.
>
> You must have an configuration file called App.config in the host program
> that uses your class library.
>
> If you target to the runtime .NET/Mono 2.0 or above, you can use
> System.Configuration.ConfigurationManager.AppSettings["your_key"] to get the
> values.
>
> If you compile your app, it must be renamed to Your_App.exe.config.
>
> In my project this is that I do.
>
> Regards.
>
> 2009/11/11 Costantino Pipero <cos at beeond.net>
>>
>> I have a class library project and I created a configuration file
>>
>> <configuration>
>> <appSettings>
>> <add key = "ImagesFolder" value = "/user/home/somefolder/" />
>> </appSettings>
>> </configuration>
>>
>> I was looking into the documentation but it's missing on how to use the
>> AppSettingsReader class:
>>
>> 1 - how do I tell it which file to use?
>> 2 - does it understand <appSettings> ?
>>
>> I wonder if anyone out there has used it successfully. Thank you so much
>> for your advice
>>
>> Cos
>> _______________________________________________
>> Mono-list maillist - Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>>
>
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
--
Cordially.
Small Eric Quotations of the days:
---------------------------------------------------------------------------
I have no special talents. I am only passionately curious
More information about the Mono-list
mailing list