Show / Hide Table of Contents

Class IniFileReader

Provide a managed interface to GetPrivateProfileString in the Windows API, with methods to retrieve the values of individual keys and lists of the keys in a section or the sections in a file.

Inheritance
System.Object
IniFileReader
Namespace: WizardWrx.DLLConfigurationManager
Assembly: WizardWrx.DLLConfigurationManager.dll
Syntax
public class IniFileReader : object

Constructors

| Improve this Doc View Source

IniFileReader(String)

Construct an instance of the class.

Declaration
public IniFileReader(string INIPath)
Parameters
Type Name Description
System.String INIPath

This string must be the fully qualified name of a well formed private profile (INI) file.

Fields

| Improve this Doc View Source

path

This string holds the fully qualified name of the private profile file to process, which is passed into the constructor, but can be changed as needed.

Declaration
public string path
Field Value
Type Description
System.String

Methods

| Improve this Doc View Source

GetEntryNames(String)

The Function called to obtain the EntryKeys from the given SectionHeader string passed, and returns them in an Dynamic Array

Declaration
public string[] GetEntryNames(string section)
Parameters
Type Name Description
System.String section

This string must be the name of a section which is expected to be present, though possibly empty.

Returns
Type Description
System.String[]

The return value is an array of strings, each of which is the name of a key (entry) in the specified section.

| Improve this Doc View Source

GetEntryValue(String, String)

The Function called to obtain the EntryKey Value from the given SectionHeader and EntryKey string passed, then returned

Declaration
public string GetEntryValue(string section, string entry)
Parameters
Type Name Description
System.String section

This string must be the name of a section that is expected to exist.

System.String entry

This string must be the name of a key (entry) that is expected to exist, though it might be empty.

Returns
Type Description
System.String

The return value is a string, which may be empty.

| Improve this Doc View Source

GetSectionNames()

The Function called to obtain the SectionHeaders, and returns them in an Dynamic Array

Declaration
public string[] GetSectionNames()
Returns
Type Description
System.String[]

The return value is an array of strings, each of which is the name of a section.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX