I use an ini file in another language to load user settings into an application. However, I see that C# does not natively support ini files, and favours xml.

My problem is I've never worked with xml and Im new to C#.

What I have been looking for (unsuccessfully) is an example of C# dynamically loading data from an xml, and writing data to same.

I'd be grateful for an example or a link to one, or any other method to achieve same.


edit --

example of my needs.


This section could have a varying number of keys and each key can have a varying length string, which I would normally read into an array, which would be created at runtime.

I have to admit that this is scaring me a little in C#.

You might want to consider using the application Settings. (Properties Settings Tab)

There are two types of settings, Application and User.

User settings are specific to the current user and it is possible to read/write User settings.
These are generally used to save user configurable options.

Application settings are read only and available to all users.
These are generally used to enable settings such as database connection strings to be overriden for a specific installation.

Both sets of settings support various types: including a StringCollection.
They are available to read(write) using Properties.Settings.Default.<settingName>