編輯

共用方式為


Duration.Implicit(TimeSpan to Duration) Operator

Definition

Implicitly creates a Duration from a given TimeSpan.

public:
 static operator System::Windows::Duration(TimeSpan timeSpan);
public static implicit operator System.Windows.Duration (TimeSpan timeSpan);
static member op_Implicit : TimeSpan -> System.Windows.Duration
Public Shared Widening Operator CType (timeSpan As TimeSpan) As Duration

Parameters

timeSpan
TimeSpan

TimeSpan from which an instance of Duration is implicitly created.

Returns

A new instance of Duration.

Exceptions

Occurs when TimeSpan is negative.

Remarks

The equivalent method for this operator is Duration.Duration(TimeSpan)

Applies to