C# Class Revit.SDK.Samples.ModifyIniFile.CS.IniFile

Contains methods to read and write value to specialized key in an ini file
显示文件 Open project: AMEE/revit

Public Methods

Method Description
IniFile ( string inipath ) : System

Initializes a new instance of IniFile to read and write

IniReadInt ( string section, string key, int def ) : int

Retrieves an integer associated with a key in the specified section.

IniWriteString ( string section, string key, string value ) : bool

Copies a string into the specified section of an initialization file.

Private Methods

Method Description
GetPrivateProfileInt ( string section, string key, int def, string filePath ) : int
WritePrivateProfileString ( string section, string key, string val, string filePath ) : int

Method Details

IniFile() public method

Initializes a new instance of IniFile to read and write
public IniFile ( string inipath ) : System
inipath string Path of ini file to read or write
return System

IniReadInt() public method

Retrieves an integer associated with a key in the specified section.
public IniReadInt ( string section, string key, int def ) : int
section string The name of the section to which the string will be copied.
key string The name of the key to be associated with a string.
def int The default value to return if the key name cannot be found.
return int

IniWriteString() public method

Copies a string into the specified section of an initialization file.
public IniWriteString ( string section, string key, string value ) : bool
section string The name of the section to which the string will be copied.
key string The name of the key to be associated with a string.
value string A string to be written to the file.
return bool