Duration Structure
TOC
Collapse the table of content
Expand the table of content

Duration Structure

 

Represents the duration of time that a Timeline is active.

Namespace:   System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)

[TypeConverterAttribute(typeof(DurationConverter))]
public struct Duration

NameDescription
System_CAPS_pubmethodDuration(TimeSpan)

Initializes a new instance of the Duration structure with the supplied TimeSpan value.

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticAutomatic

Gets a Duration value that is automatically determined.

System_CAPS_pubpropertySystem_CAPS_staticForever

Gets a Duration value that represents an infinite interval.

System_CAPS_pubpropertyHasTimeSpan

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

System_CAPS_pubpropertyTimeSpan

Gets the TimeSpan value that this Duration represents.

NameDescription
System_CAPS_pubmethodAdd(Duration)

Adds the value of the specified instance of Duration to the value of the current instance.

System_CAPS_pubmethodSystem_CAPS_staticCompare(Duration, Duration)

Compares one Duration value to another.

System_CAPS_pubmethodEquals(Duration)

Determines whether a specified Duration is equal to this instance of Duration.

System_CAPS_pubmethodSystem_CAPS_staticEquals(Duration, Duration)

Determines whether two instances of Duration are equal.

System_CAPS_pubmethodEquals(Object)

Determines whether a specified object is equal to an instance of Duration.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodGetHashCode()

Gets a hash code for this instance.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticPlus(Duration)

Returns the specified instance of Duration.

System_CAPS_pubmethodSubtract(Duration)

Subtracts the value of the specified instance of Duration from this instance.

System_CAPS_pubmethodToString()

Converts an instance of Duration to a String representation.(Overrides ValueType.ToString().)

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticAddition(Duration, Duration)

Adds two instances of Duration together.

System_CAPS_puboperatorSystem_CAPS_staticEquality(Duration, Duration)

Determines whether two instances of Duration are equal.

System_CAPS_puboperatorSystem_CAPS_staticGreaterThan(Duration, Duration)

Determines if one instance of Duration is greater than another.

System_CAPS_puboperatorSystem_CAPS_staticGreaterThanOrEqual(Duration, Duration)

Determines whether an instance of Duration is greater than or equal to another instance.

System_CAPS_puboperatorSystem_CAPS_staticImplicit(TimeSpan to Duration)

Implicitly creates a Duration from a given TimeSpan.

System_CAPS_puboperatorSystem_CAPS_staticInequality(Duration, Duration)

Determines if two instances of Duration are not equal.

System_CAPS_puboperatorSystem_CAPS_staticLessThan(Duration, Duration)

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

System_CAPS_puboperatorSystem_CAPS_staticLessThanOrEqual(Duration, Duration)

Determines if the value of one instance of Duration is less than or equal to the value of another instance.

System_CAPS_puboperatorSystem_CAPS_staticSubtraction(Duration, Duration)

Subtracts the value of one instance of Duration from another.

System_CAPS_puboperatorSystem_CAPS_staticUnaryPlus(Duration)

Returns the specified instance of Duration.

<object property="[days.]hours:minutes:seconds[.fractionalSeconds]"/>

- or -

<object property="[days.]hours:minutes"/>

- or -

<object property="Automatic"/>

- or -

<object property="Forever"/>

days

System.Int32

A value greater than or equal to 0 that describes the number of days spanned by this duration.

hours

System.Int32

A value between 0 and 23 that represents the number of hours spanned by this duration.

minutes

System.Int32

A value between 0 and 59 that represents the number of minutes spanned by this duration.

seconds

System.Int32

A value between 0 and 59 that represents the number of seconds spanned by this duration

fractionalSeconds

System.Int32

A value consisting of 1 to 7 digits that represents fractional seconds.

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft