DurationHelper.GetHasTimeSpan(Duration) DurationHelper.GetHasTimeSpan(Duration) DurationHelper.GetHasTimeSpan(Duration) DurationHelper.GetHasTimeSpan(Duration) Method

Definition

Returns whether the TimeSpan component of a given Duration holds a non-null value. C# and Microsoft Visual Basic code should use Duration.HasTimeSpan instead.

public : static Platform::Boolean GetHasTimeSpan(Duration target)
static bool GetHasTimeSpan(Duration target) const;
public static bool GetHasTimeSpan(Duration target)
Public Shared Function GetHasTimeSpan(target As Duration) As bool

Parameters

target
Duration Duration

The Duration value to evaluate.

Returns

bool bool

true if the TimeSpan component of the provided Duration is not null; otherwise, false.

Remarks

If this method returns false, then the Duration is either uninitialized or holds one of the special values of Automatic or Forever.