JsonElement.TryGetDateTimeOffset(DateTimeOffset) JsonElement.TryGetDateTimeOffset(DateTimeOffset) JsonElement.TryGetDateTimeOffset(DateTimeOffset) JsonElement.TryGetDateTimeOffset(DateTimeOffset) Method

Definition

Attempts to represent the current JSON string as a DateTimeOffset.

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

Parameters

value
DateTimeOffset DateTimeOffset DateTimeOffset DateTimeOffset

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

Returns

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

Exceptions

Remarks

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

Applies to