JsonElement.TryGetDouble(Double) JsonElement.TryGetDouble(Double) JsonElement.TryGetDouble(Double) JsonElement.TryGetDouble(Double) Method

Definition

Attempts to represent the current JSON number as a Double.

public:
 bool TryGetDouble([Runtime::InteropServices::Out] double % value);
public bool TryGetDouble (out double value);
member this.TryGetDouble :  -> bool
Public Function TryGetDouble (ByRef value As Double) As Boolean

Parameters

value
Double Double Double Double

When this method returns, contains a double-precision floating point value equivalent to the current JSON number.

Returns

true if the number can be represented as a Double, false otherwise.

Exceptions

Remarks

This method does not parse the contents of a JSON string value.

On .NET Core, this method does not return false for values larger than Double.MaxValue or smaller than Double.MinValue. Instead, it returns <see langword="true> and assigns Double.PositiveInfinity or Double.NegativeInfinity to value.

Applies to