TomlProperty Struct

A key and its value in a table of a TomlDocument.

public readonly struct TomlProperty

Properties

NameDescription
NameGets the decoded key.
NameFlagsGets how the key is written: bare, or quoted.
ValueGets the value.

Gets the decoded key.

public string Name { get; }

Property value

string

Gets how the key is written: bare, or quoted.

public Utf8TomlTokenFlags NameFlags { get; }

Property value

Utf8TomlTokenFlags

Gets the value.

public TomlElement Value { get; }

Property value

TomlElement

Methods

NameDescription
NameEquals(ReadOnlySpan<byte>)Compares the key to UTF-8 text, without allocating.
NameEquals(ReadOnlySpan<char>)Compares the key to text, without allocating.
NameEquals(string?)Compares the key to text, without allocating.
ToString()Returns the fully qualified type name of this instance.

NameEquals overloads

NameEquals(ReadOnlySpan<byte>)

TomlProperty.cs

Compares the key to UTF-8 text, without allocating.

public bool NameEquals(ReadOnlySpan<byte> utf8Text)
Parameters
utf8Text ReadOnlySpan<byte>
Returns

bool

NameEquals(ReadOnlySpan<char>)

TomlProperty.cs

Compares the key to text, without allocating.

public bool NameEquals(ReadOnlySpan<char> text)
Parameters
text ReadOnlySpan<char>
Returns

bool

NameEquals(string?)

TomlProperty.cs

Compares the key to text, without allocating.

public bool NameEquals(string? text)
Parameters
text string?
Returns

bool

ToString()

TomlProperty.cs

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string The fully qualified type name.