How to translate a config.ini file into C#.NET objects

Posted by JACK IN THE CRACK on Stack Overflow See other posts from Stack Overflow or by JACK IN THE CRACK
Published on 2010-03-27T06:38:12Z Indexed on 2010/03/27 6:43 UTC
Read the original article Hit count: 250

Filed under:
|
|
|

config.ini:

[globalloads]
plugin.SWPlugin = 1
plugin.SWPlugin.params.1 = true
plugin.SWPlugin.params.2 = 10

[testz : globballoads]
plugin.SWPlugin.params.2 = 20

Simple enough?

// load testz config and programmatically create this equivalent code:
SWPluginAbstract p = new SWPlugin(true, 20);

If a different config.ini setup is needed to do that, it's not a problem...

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#