Class IniFileSettings
Contains all functions to work with ini files
Inheritance
System.Object
IniFileSettings
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Simplic.Configuration.Ini
Assembly: Simplic.CoreLib.dll
Syntax
public class IniFileSettings
Constructors
| Improve this Doc View SourceIniFileSettings(String)
Create Ini-File-Reader
Declaration
public IniFileSettings(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | Path to the ini-file |
Properties
| Improve this Doc View SourceFilePath
Get or set the path to the ini-file
Declaration
public string FilePath { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceReadSections()
Read all sections from the ini-file
Declaration
public string[] ReadSections()
Returns
Type | Description |
---|---|
System.String[] |
ReadValue<T>(String, String, T)
Declaration
public T ReadValue<T>(string key, string section = "Default", T defaultValue = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
System.String | section | |
T | defaultValue |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
WriteValue<T>(String, T, String)
Declaration
public void WriteValue<T>(string key, T value, string section = "Default")
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
T | value | |
System.String | section |
Type Parameters
Name | Description |
---|---|
T |