Mosh
Mosh

Reputation: 31

Reading INI files using Nini / .NET

I'm using "Nini" to read INI files. It works well but I've just found a problem that could be a bug. Do you know it?

The situation is when I read a string (using 'get' or 'getstring' functions) which contains = or " signs Nini stop reading the rest of the line and ignore it. It seems that it stops reading after some characters, but I couldn't find a document that describes it or what chars are ignored.

Let me know if you know about it.

Thanks

Upvotes: 3

Views: 563

Answers (1)

Tomas
Tomas

Reputation: 553

You can change this behavior by specifying, that you are reading a "windows style" ini file. When creating the IConfigSource, first create an IniDocument and specify the ini file

IniDocument doc = new IniDocument(CONFIG_FILE_NAME, IniFileType.WindowsStyle); IConfigSource source = new IniConfigSource(doc);

Upvotes: 2

Related Questions