Table of Contents

IniReaderOptions Struct

Definition

Namespace
Bodu.Text.Ini.Reader
Assembly
Bodu.Text.Ini.dll
Package
Bodu.Text.Ini 1.0.0
Source
IniReaderOptions.cs

Provides configuration for a Utf8IniReader, controlling comment recognition.

public readonly struct IniReaderOptions
Inherited Members
Extension Methods

Remarks

The reader is source-order and does not itself resolve duplicate sections/keys or apply case rules - those are document-model concerns. Inline comments are deliberately not recognized: a value retains everything after the assignment to the end of the line, matching the safer configparser dialect and avoiding the classic value ; not-a-comment footgun.

Properties

Default

Gets the default reader options (both ; and # begin comments, comments surfaced as tokens).

public static IniReaderOptions Default { get; }

Property Value

IniReaderOptions

The default options.

DisallowHashComments

Gets a value indicating whether a leading # is rejected as a comment prefix, leaving ; as the only comment character.

public bool DisallowHashComments { get; init; }

Property Value

bool

true to disable # comments; otherwise false.

Remarks

The property is inverted so the parameterless Default accepts both comment characters.

SkipComments

Gets a value indicating whether comment lines are surfaced as Comment tokens.

public bool SkipComments { get; init; }

Property Value

bool

true to skip comment tokens; otherwise false.

Remarks

The property is inverted so the parameterless Default preserves comments.

Applies to

ProductVersions
.NET8, 10