1

Closed

Basic usage of the library

description

I'm trying to make use of the library, its well written code AnarkiNet - but some how, i dont seem to get a IniFile returned 'myIni' stays NULL
        bool bResult;
        IniReaderSettings iniReadsettings = new IniReaderSettings();
        IniReader iniRead = new IniReader(iniReadsettings);

        FileStream fStream = File.OpenRead("c:\\data.ini");

        IniFile myIni = iniRead.Read(fStream, out bResult);
        MessageBox.Show(Convert.ToString(myIni.SectionCount));
Closed Sep 16, 2007 at 9:14 AM by WShelley
Fixed with the release of LibINI 1.5.1.0.

comments

WShelley wrote Sep 14, 2007 at 3:42 AM

what is the value of bResult? Also, can you pastebin the "data.ini" file you are working with and provide a link to it here?

MikeMoo wrote Sep 14, 2007 at 7:39 AM

The result stays false, i just tried to see whether using the readersetting IniEntryDuplicationHandlingMethod.multikey / or concatenate would help. Since the .ini file im testing with countains duplicate/multiple entries with the same name, but the result stays the same

bResult stays false, myIni isnt initialized (with an instance of anything)

this is how my ini looks like --------------------begin code------------------[Test]First = 1Second = 2Third = 3Fourth = 4

[SectionTest]Double = TestDouble = Test---------------------end code------------------

And this is how the code looks, as how im currently using it:--------------------begin code------------------bool bResult;IniReaderSettings iniReadsettings = new IniReaderSettings();iniReadsettings.EntryDuplicationHandlingMethod = IniEntryDuplicationHandlingMethod.Concatenate;IniReader iniRead = new IniReader(iniReadsettings);

FileStream fStream = File.OpenRead("c:\data.ini");

IniFile myIni = iniRead.Read(fStream, out bResult);MessageBox.Show(Convert.ToString(myIni.SectionCount));---------------------end code------------------

wrote Sep 16, 2007 at 9:14 AM

wrote Sep 16, 2007 at 9:14 AM

wrote Feb 13, 2013 at 8:42 PM

wrote May 16, 2013 at 1:36 AM