JsonElement.TryGetDateTime(DateTime) JsonElement.TryGetDateTime(DateTime) JsonElement.TryGetDateTime(DateTime) JsonElement.TryGetDateTime(DateTime) Method

Definition

Attempts to represent the current JSON string as a DateTime.

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

Parameters

value
DateTime DateTime DateTime DateTime

When this method returns, contains the date and time value equivalent to the current JSON string.

Returns

true if the string can be represented as a DateTime, false otherwise.

Exceptions

Remarks

This method does not create a DateTime representation of values other than JSON strings.

Applies to