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.

 static bool GetHasTimeSpan(Duration const& target);
public static bool GetHasTimeSpan(Duration target);
function getHasTimeSpan(target)
Public Shared Function GetHasTimeSpan (target As Duration) As Boolean

Parameters

target
Duration

The Duration value to evaluate.

Returns

Boolean

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.

Applies to