.INI in VB.Net?

  • Thread starter Thread starter Tommy Long
  • Start date Start date
http://nini.sourceforge.net/index.php
Is there a framework like this which uses XML to read AND write user
settings?

It can read and write XML-Files. But I don't exactly understand what
you mean by user settings.

Of course you can create a user specific XML INI file (e.g.
%USERPROFILE%\<APPLICATIONNAME>\settings.xml)

But maybe you mean a user specific config file shadowing the global
settings? I guess you can easily create a new method to read a global
INI file and overload its settings with a local INI file.

Michael
 
It can read and write XML-Files. But I don't exactly understand what
you mean by user settings.

Of course you can create a user specific XML INI file (e.g.
%USERPROFILE%\<APPLICATIONNAME>\settings.xml)

But maybe you mean a user specific config file shadowing the global
settings? I guess you can easily create a new method to read a global
INI file and overload its settings with a local INI file.

I have two requirements:

o I need the ability to create new settings at run-time. As far as I
see, My.Settings won't let me do this ... you must define the settings
at design-time.

o I need to be able to have more than 1 level of nesting (i.e. subkeys
or subsections).

For example:

<Config>
<Level1>
<Key1 Value="abc" />
<Key2 Value="xyz" />
</Level1>
<Level2>
<Leval2a>
<Key3 Value="123" />
</Level2a>
</Level2>
</Config>

Level1 might contain the app's appearance settings, like window
positioning, fonts, etc. Level2 might be a section for custom tools,
with Level2a being one of the tools. I don't think Nini's XML classes
can do this.

So over the weekend I rolled my own class that does what I want.

Thanks...
 
Back
Top