[Mono-devel-list] Java Properties or other way to store configuration

Rafael Teixeira monoman at gmail.com
Tue Jul 27 12:21:33 EDT 2004


Mainly Configuration Files are readonly from the program perspective.
For mutable settings, serializing (in binary or xml format) your
settings to IsolatedStorage, is the .NET/Mono portable way. See
classes System.IO.IsolatedStorage.IsolatedStorage and
System.IO.IsolatedStorage.IsolatedStorageFile.

In the GTK#/Gnome# world using GConf as someone else has pointed is better.

At the other end of the spectrum, the WinForms world, we have 
System.Windows.Forms.Application class that has some shorthands to
paths that can be used like IsolatedStorage to have some
configurations shared by users and others being exclusive to each
user.

Hope it helps,

On Tue, 27 Jul 2004 08:37:21 -0700, Jackson Harper <jackson at ximian.com> wrote:
> On Mon, 2004-07-26 at 15:01, Leon Stringer wrote:
> > Hi,
> >
> > Is there a good/easy/recommended way to store and retrieve configuration
> > settings from a Mono C# program on GNU/Linux?
> 
>  Check out configuration files:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfNETFrameworkConfigurationFileSchema.asp
> 
>  and more specifically the appSettings element of the configuration
> files:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfappsettingselement.asp
> 
> Jackson
> 
> 
> 
> 
> > I used to be a big user of Java's java.util.Properties to hold
> > attrib/value pairs for my program which could then be written to disk
> > for persistant settings.
> >
> > Is there a way to do something similar with Mono? (E.g. for global
> > settings in /etc/xxx.conf and user settings in ~/.xxx).
> >
> > Thanks in advance,
> >
> > Leon...
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 


-- 
Rafael "Monoman" Teixeira
Mais um blog: http://br.thespoke.net/MyBlog/Monoman/MyBlog.aspx



More information about the Mono-devel-list mailing list