C# Class Wia.Utility.IniFileManager

Read/Write .ini Files Version 1, 2009-08-15 http://www.Stum.de
It supports the simple .INI Format: [SectionName] Key1=Value1 Key2=Value2 [Section2] Key3=Value3 You can have empty lines (they are ignored), but comments are not supported Key4=Value4 ; This is supposed to be a comment, but will be part of Value4 Whitespace is not trimmed from the beginning and end of either Key and Value Licensed under WTFPL http://sam.zoy.org/wtfpl/
Mostra file Open project: nansen/wia Class Usage Examples

Public Methods

Method Description
GetSection ( string sectionName ) : string>.Dictionary

Get all the Values for a section

GetValue ( string sectionName, string key ) : string

Get a specific value from the .ini file

IniFileManager ( ) : System.Collections.Generic
IniFileManager ( string filename ) : System.Collections.Generic
Load ( string filename ) : bool

Load an .INI File

Save ( string filename ) : bool

Save the content of this class to an INI File

SetSection ( string sectionName, string>.IDictionary sectionValues ) : void

Set an entire sections values

SetValue ( string sectionName, string key, string value ) : void

Set a specific value in a section

Method Details

GetSection() public method

Get all the Values for a section
public GetSection ( string sectionName ) : string>.Dictionary
sectionName string
return string>.Dictionary

GetValue() public method

Get a specific value from the .ini file
public GetValue ( string sectionName, string key ) : string
sectionName string
key string
return string

IniFileManager() public method

public IniFileManager ( ) : System.Collections.Generic
return System.Collections.Generic

IniFileManager() public method

public IniFileManager ( string filename ) : System.Collections.Generic
filename string
return System.Collections.Generic

Load() public method

Load an .INI File
public Load ( string filename ) : bool
filename string
return bool

Save() public method

Save the content of this class to an INI File
public Save ( string filename ) : bool
filename string
return bool

SetSection() public method

Set an entire sections values
public SetSection ( string sectionName, string>.IDictionary sectionValues ) : void
sectionName string
sectionValues string>.IDictionary
return void

SetValue() public method

Set a specific value in a section
public SetValue ( string sectionName, string key, string value ) : void
sectionName string
key string
value string
return void