IniReaderOptions Struct
Definition
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
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
Remarks
The property is inverted so the parameterless Default preserves comments.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |