C# Class ARCed.Core.Ini

Static class for reading/writing keys and values from an .ini file
Show file Open project: borisblizzard/arcreator

Public Methods

Method Description
Load ( string filename ) : bool

Prepares the file to be read by the parser

ReadFloat ( string section, string key ) : float

Returns a float value read from the file

ReadInteger ( string section, string key ) : int

Returns an integer value read from the file

ReadString ( string section, string key ) : string

Returns a string value read from the file

ReadStringSplit ( string section, string key, char separator ) : string[]

Returns an array of values from splitting a string

Write ( string section, string key, string value ) : void

Writes a value to the .ini file

Method Details

Load() public static method

Prepares the file to be read by the parser
public static Load ( string filename ) : bool
filename string The path to be parsed
return bool

ReadFloat() public static method

Returns a float value read from the file
public static ReadFloat ( string section, string key ) : float
section string The section of the .ini file
key string A key name in the .ini file
return float

ReadInteger() public static method

Returns an integer value read from the file
public static ReadInteger ( string section, string key ) : int
section string The section of the .ini file
key string A key name in the .ini file
return int

ReadString() public static method

Returns a string value read from the file
public static ReadString ( string section, string key ) : string
section string The section of the .ini file
key string A key name in the .ini file
return string

ReadStringSplit() public static method

Returns an array of values from splitting a string
public static ReadStringSplit ( string section, string key, char separator ) : string[]
section string The section of the .ini file
key string A key name in the .ini file
separator char The separator string used for splitting
return string[]

Write() public static method

Writes a value to the .ini file
public static Write ( string section, string key, string value ) : void
section string The section of the .ini file
key string A key name in the .ini file
value string The value to write
return void