JsonValue Implicit Conversion (JsonValue to TimeSpan)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Enables implicit casts from an instance of type JsonValue to a TimeSpan object.

Namespace:  System.Json
Assembly:  System.Json (in System.Json.dll)

Syntax

'Declaration
Public Shared Widening Operator CType ( _
    value As JsonValue _
) As TimeSpan
public static implicit operator TimeSpan (
    JsonValue value
)

Parameters

Return Value

Type: System.TimeSpan
The TimeSpan initialized with the JsonValue value specified.

Exceptions

Exception Condition
InvalidCastException

The JsonType of value is not a String and so cannot be cast to TimeSpan.

Remarks

This static method typically is not explicitly called by users. It is invoked automatically to enable implicit casts when made.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.