Duration Duration Duration Duration Struct

Definition

Represents the duration of time that a Timeline is active.

public value class Duration
[System.Security.SecurityCritical]
public struct Duration
type Duration = struct
Public Structure Duration
Inheritance
Attributes

Remarks

This struct represents the .NET projection of the Windows Runtime (WinRT) Duration struct. For more information, see Duration in the UWP API reference.

Constructors

Duration(TimeSpan) Duration(TimeSpan) Duration(TimeSpan) Duration(TimeSpan)

Initializes a new instance of the Duration struct with the specified TimeSpan value.

Properties

Automatic Automatic Automatic Automatic

Gets a Duration value that is automatically determined.

Forever Forever Forever Forever

Gets a Duration value that represents an infinite interval.

HasTimeSpan HasTimeSpan HasTimeSpan HasTimeSpan

Gets a value that indicates if this Duration represents a TimeSpan value.

TimeSpan TimeSpan TimeSpan TimeSpan

Gets the TimeSpan value that this Duration represents.

Methods

Add(Duration) Add(Duration) Add(Duration) Add(Duration)

Adds the value of the specified Duration to this Duration.

Compare(Duration, Duration) Compare(Duration, Duration) Compare(Duration, Duration) Compare(Duration, Duration)

Compares one Duration value to another.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether a specified object is equal to a Duration.

Equals(Duration) Equals(Duration) Equals(Duration) Equals(Duration)

Determines whether a specified Duration is equal to this Duration.

Equals(Duration, Duration) Equals(Duration, Duration) Equals(Duration, Duration) Equals(Duration, Duration)

Determines whether two Duration values are equal.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Gets a hash code for this object.

Subtract(Duration) Subtract(Duration) Subtract(Duration) Subtract(Duration)

Subtracts the specified Duration from this Duration.

ToString() ToString() ToString() ToString()

Converts a Duration to a String representation.

Operators

Addition(Duration, Duration) Addition(Duration, Duration) Addition(Duration, Duration) Addition(Duration, Duration)

Adds two Duration values together.

Equality(Duration, Duration) Equality(Duration, Duration) Equality(Duration, Duration) Equality(Duration, Duration)

Determines whether two Duration cases are equal.

GreaterThan(Duration, Duration) GreaterThan(Duration, Duration) GreaterThan(Duration, Duration) GreaterThan(Duration, Duration)

Determines if one Duration is greater than another.

GreaterThanOrEqual(Duration, Duration) GreaterThanOrEqual(Duration, Duration) GreaterThanOrEqual(Duration, Duration) GreaterThanOrEqual(Duration, Duration)

Determines whether a Duration is greater than or equal to another.

Implicit(TimeSpan to Duration) Implicit(TimeSpan to Duration) Implicit(TimeSpan to Duration) Implicit(TimeSpan to Duration)

Implicitly creates a Duration from a given TimeSpan.

Inequality(Duration, Duration) Inequality(Duration, Duration) Inequality(Duration, Duration) Inequality(Duration, Duration)

Determines if two Duration cases are not equal.

LessThan(Duration, Duration) LessThan(Duration, Duration) LessThan(Duration, Duration) LessThan(Duration, Duration)

Determines if a Duration is less than the value of another instance.

LessThanOrEqual(Duration, Duration) LessThanOrEqual(Duration, Duration) LessThanOrEqual(Duration, Duration) LessThanOrEqual(Duration, Duration)

Determines if a Duration is less than or equal to another.

Subtraction(Duration, Duration) Subtraction(Duration, Duration) Subtraction(Duration, Duration) Subtraction(Duration, Duration)

Subtracts the value of one Duration from another.

UnaryPlus(Duration) UnaryPlus(Duration) UnaryPlus(Duration) UnaryPlus(Duration)

Returns the specified Duration.

Applies to

See also