JsonElement.TryGetDouble(Double) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 : double -> bool
Public Function TryGetDouble (ByRef value As Double) As Boolean
Parameters
- value
- Double
When this method returns, contains a double-precision floating point value equivalent to the current JSON number if the conversion succeeded, or 0 if the conversion failed.
Returns
true
if the number can be represented as a Double; otherwise, false
.
Exceptions
The parent JsonDocument has been disposed.
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 true
and assigns Double.PositiveInfinity or Double.NegativeInfinity to value
.
Applies to
Atsauksmes
https://aka.ms/ContentUserFeedback.
Drīzumā: 2024. gada laikā mēs pakāpeniski pārtrauksim izmantot “GitHub problēmas” kā atsauksmju par saturu mehānismu un aizstāsim to ar jaunu atsauksmju sistēmu. Papildinformāciju skatiet:Iesniegt un skatīt atsauksmes par