[Nini-general] Problem with a non valid ini file
Brought to you by:
bmatzelle
From: dh <dh...@cu...> - 2005-06-03 08:55:16
|
Hi all, I have this code (in C#) for reading an .ini file: string filename = "c:\temp\test.ini"; try { IConfig config = null; IConfigSource source = new IniConfigSource(fileName); } catch(System.Exception ex) { File.Delete(fileName); } It works great with a well-formed .ini file, but I have a problem with a non valid .ini file which does not contain a '[' and a ']'. For example, I create an .ini file with only this word inside: nothing. The file still remains opened and I cannot delete it. How could I resolve this problem? Thanks. Damien Heckler |