TomlFloatSyntax Class

A float, such as 3.14, 6.626e-34, inf, or nan.

public sealed class TomlFloatSyntax : TomlValueSyntax
Inheritance
TomlValueSyntax TomlFloatSyntax

Properties

NameDescription
FloatToken
ValueGets the value of the float.
public SyntaxToken FloatToken { get; }

Property value

SyntaxToken

No documentation is available.

Gets the value of the float.

public double Value { get; }

Property value

double

Exceptions

InvalidOperationException
The token was built by hand and does not spell a float.

Remarks

The value is the nearest Double: a number too close to zero for one, such as 1e-400, is read as zero with its sign, as IEEE 754 rounding gives. A number too large for one is an error instead (TOML0006), because the nearest Double would be an infinity, which is another value.

Methods

NameDescription
Accept(TomlSyntaxVisitor)
Accept<TResult>(TomlSyntaxVisitor<TResult>)
Update(SyntaxToken)Returns this value with a different token, or itself when nothing changed.
WithFloatToken(SyntaxToken)
WithValue(double)Returns this float with a new value.

Accept overloads

Accept(TomlSyntaxVisitor)

TomlFloatSyntax.cs
public override void Accept(TomlSyntaxVisitor visitor)
Parameters
visitor TomlSyntaxVisitor

No documentation is available.

Accept<TResult>(TomlSyntaxVisitor<TResult>)

TomlFloatSyntax.cs
public override TResult? Accept<TResult>(TomlSyntaxVisitor<TResult> visitor)
Type parameters
TResult
Parameters
visitor TomlSyntaxVisitor<TResult>
Returns

TResult?

No documentation is available.

Update(SyntaxToken)

TomlFloatSyntax.cs

Returns this value with a different token, or itself when nothing changed.

public TomlFloatSyntax Update(SyntaxToken floatToken)

Parameters

floatToken SyntaxToken

Returns

TomlFloatSyntax

WithFloatToken(SyntaxToken)

TomlFloatSyntax.cs
public TomlFloatSyntax WithFloatToken(SyntaxToken floatToken)

Parameters

floatToken SyntaxToken

Returns

TomlFloatSyntax

No documentation is available.

WithValue(double)

TomlFloatSyntax.cs

Returns this float with a new value.

public TomlFloatSyntax WithValue(double value)

Parameters

value double

Returns

TomlFloatSyntax