KitchenDraw SDK 2
Show / Hide Table of Contents

Method ReadIniValueOrDefault

ReadIniValueOrDefault(string, string, string, bool)

Returns value of an .INI file entry, or default value if the entry does not exist.

Declaration
public bool ReadIniValueOrDefault(string iniFilename, string sectionName, string keyName, bool defaultValue)
Parameters
Type Name Description
string iniFilename

The .INI file to read.

string sectionName

Section to read (without square brackets).

string keyName

Key to read.

bool defaultValue

Default value that will be returned if the key does not exist in the section of the .INI file.

Returns
Type Description
bool

Value if the .INI file entry of the default value (if the entry doesn't exist in the file).

Remarks

Relative paths are counted from the application directory. Thus, you do not need to provide a full path for the SPACE.INI, for example. Just pass "SPACE.INI" string as iniFilename parameter value.

ReadIniValueOrDefault(string, string, string, double)

Returns value of an .INI file entry, or default value if the entry does not exist.

Declaration
public double ReadIniValueOrDefault(string iniFilename, string sectionName, string keyName, double defaultValue)
Parameters
Type Name Description
string iniFilename

The .INI file to read.

string sectionName

Section to read (without square brackets).

string keyName

Key to read.

double defaultValue

Default value that will be returned if the key does not exist in the section of the .INI file.

Returns
Type Description
double

Value if the .INI file entry of the default value (if the entry doesn't exist in the file).

Remarks

Relative paths are counted from the application directory. Thus, you do not need to provide a full path for the SPACE.INI, for example. Just pass "SPACE.INI" string as iniFilename parameter value.

ReadIniValueOrDefault(string, string, string, int)

Returns value of an .INI file entry, or default value if the entry does not exist.

Declaration
public int ReadIniValueOrDefault(string iniFilename, string sectionName, string keyName, int defaultValue)
Parameters
Type Name Description
string iniFilename

The .INI file to read.

string sectionName

Section to read (without square brackets).

string keyName

Key to read.

int defaultValue

Default value that will be returned if the key does not exist in the section of the .INI file.

Returns
Type Description
int

Value if the .INI file entry of the default value (if the entry doesn't exist in the file).

Remarks

Relative paths are counted from the application directory. Thus, you do not need to provide a full path for the SPACE.INI, for example. Just pass "SPACE.INI" string as iniFilename parameter value.

ReadIniValueOrDefault(string, string, string, string)

Returns value of an .INI file entry, or default value if the entry does not exist.

Declaration
public string ReadIniValueOrDefault(string iniFilename, string sectionName, string keyName, string defaultValue)
Parameters
Type Name Description
string iniFilename

The .INI file to read.

string sectionName

Section to read (without square brackets).

string keyName

Key to read.

string defaultValue

Default value that will be returned if the key does not exist in the section of the .INI file.

Returns
Type Description
string

Value if the .INI file entry of the default value (if the entry doesn't exist in the file).

Remarks

Relative paths are counted from the application directory. Thus, you do not need to provide a full path for the SPACE.INI, for example. Just pass "SPACE.INI" string as iniFilename parameter value.

In this article
Back to top Generated by DocFX