INIFile

INIFile


Provides methods for manipulating an INI initialization file.


Remarks

An INI file contains sections in a format like

[section]
key=value

A new INIFile object can be created using the NewINIFile method.

 Dim ini As INIFile
 Set ini = NewINIFile("c:\settings.ini")
 

If the file name does not specify the directory, then the file will be created in the Windows directory. In order to specify the current directory, preceed the file name with a current directory symbol ".".

 Dim ini As INIFile
 Set ini = NewINIFile(".\local.ini")
 

See Also

Project VBCorLib Overview | INISectionWriter

Implements:

IObject 

Public:

Properties:

NameDescription
 AutoFlush (get)Returns the auto-flush state of the object. 
 AutoFlush (let)Sets the auto-flush state of the object. 
 FileName (get)Returns the name of the INI file being manipulated. 

Methods:

NameDescription
 DeleteKeyDeletes a key-value pair in a specific section within an INI file. 
 DeleteSectionDeletes an entire section from an INI file, including all key-value pairs. 
 EqualsReturns a boolean indicating if the value and this object instance are the same instance. 
 FlushFlushes any cached updates to the INI file. 
 GetBooleanReturns a Boolean value from the specified key in the specified section of an INI file. 
 GetByteReturns a Byte value from the specified key in the specified section of an INI file. 
 GetCurrencyReturns a Currency value from the specified key in the specified section of an INI file. 
 GetDateReturns a Date value from the specified key in the specified section of an INI file. 
 GetDateTimeReturns a cDateTime value from the specified key in the specified section of an INI file. 
 GetDecimalReturns a Decimal value from the specified key in the specified section of an INI file. 
 GetDoubleReturns a Double value from the specified key in the specified section of an INI file. 
 GetHashCodeReturns a pseudo-unique number identifying this instance. 
 GetIntegerReturns a Integer value from the specified key in the specified section of an INI file. 
 GetKeyNamesReturns a list of key names in an INI file. 
 GetLongReturns a Long value from the specified key in the specified section of an INI file. 
 GetSectionNamesReturns a list of section names in an INI file. 
 GetSectionWriterReturns a SectionWriter used to create entire sections withing an INI file at once. 
 GetSingleReturns a Single value from the specified key in the specified section of an INI file. 
 GetStringReturns the string value of the specified key in the specified section of an INI file. 
 GetTimeSpanReturns a TimeSpan value from the specified key in the specified section of an INI file. 
 GetValuesReturns an IDictionary object containing the key-value pairs from a section in an INI file. 
 SetValueSets a key-value pair within a section of an INI file. 
 ToStringReturns a string representation of this object instance.