C# Class Nexus.Client.ModManagement.IniMethods

Provides methods to interact with INI files.
Datei anzeigen Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Methods

Method Description
GetPrivateProfileInt32 ( string section, string key, int def, string path ) : int

Reads an INI value as an Int32.

GetPrivateProfileString ( string section, string key, string def, string path ) : string

Reads an INI value as a string.

GetPrivateProfileUInt64 ( string section, string key, System.UInt64 def, string path ) : System.UInt64

Reads an INI value as an UInt64.

WritePrivateProfileInt32 ( string section, string key, int val, string path ) : void

Writes the given Int32 value to an INI file.

WritePrivateProfileString ( string section, string key, string val, string path ) : void

Writes the given ring value to an INI file.

Method Details

GetPrivateProfileInt32() public static method

Reads an INI value as an Int32.
public static GetPrivateProfileInt32 ( string section, string key, int def, string path ) : int
section string The section containing the value to be read.
key string The key of the value to be read.
def int The default value to use if the key is not present in the INI file.
path string The absolute path of the INI file.
return int

GetPrivateProfileString() public static method

Reads an INI value as a string.
public static GetPrivateProfileString ( string section, string key, string def, string path ) : string
section string The section containing the value to be read.
key string The key of the value to be read.
def string The default value to use if the key is not present in the INI file.
path string The absolute path of the INI file.
return string

GetPrivateProfileUInt64() public static method

Reads an INI value as an UInt64.
public static GetPrivateProfileUInt64 ( string section, string key, System.UInt64 def, string path ) : System.UInt64
section string The section containing the value to be read.
key string The key of the value to be read.
def System.UInt64 The default value to use if the key is not present in the INI file.
path string The absolute path of the INI file.
return System.UInt64

WritePrivateProfileInt32() public static method

Writes the given Int32 value to an INI file.
public static WritePrivateProfileInt32 ( string section, string key, int val, string path ) : void
section string The section containing the value to be written.
key string The key of the value to be written.
val int The vaue to write.
path string The absolute path of the INI file.
return void

WritePrivateProfileString() public static method

Writes the given ring value to an INI file.
public static WritePrivateProfileString ( string section, string key, string val, string path ) : void
section string The section containing the value to be written.
key string The key of the value to be written.
val string The vaue to write.
path string The absolute path of the INI file.
return void