Duration Implicit Conversion (TimeSpan to Duration)

Implicitly creates a Duration from a given TimeSpan.

Namespace:  Windows.UI.Xaml
Assembly:  System.Runtime.WindowsRuntime.UI.Xaml (in System.Runtime.WindowsRuntime.UI.Xaml.dll)

Syntax

'Declaration
Public Shared Widening Operator CType ( _
    timeSpan As TimeSpan _
) As Duration
public static implicit operator Duration (
    TimeSpan timeSpan
)
static implicit operator Duration (
    TimeSpan timeSpan
)
F# does not support the declaration of new casting operators.
JScript does not support the declaration of new casting operators.

Parameters

Return Value

Type: Windows.UI.Xaml.Duration
A created Duration.

Exceptions

Exception Condition
ArgumentException

timeSpan evaluates as less than TimeSpan.Zero.

Version Information

.NET Framework

Supported in: 4.6

See Also

Reference

Duration Structure

Windows.UI.Xaml Namespace