Duration Operators and Type Conversions

Duration Operators and Type Conversions

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

The Duration type exposes the following members.

  NameDescription
Public operator Static member Addition Adds two Duration values together.
Public operator Static member Equality Determines whether two Duration cases are equal.
Public operator Static member GreaterThan Determines if one Duration is greater than another.
Public operator Static member GreaterThanOrEqual Determines whether a Duration is greater than or equal to another.
Public operator Static member Implicit(TimeSpan to Duration) Implicitly creates a Duration from a given TimeSpan.
Public operator Static member Inequality Determines if two Duration cases are not equal.
Public operator Static member LessThan Determines if a Duration is less than the value of another instance.
Public operator Static member LessThanOrEqual Determines if a Duration is less than or equal to another.
Public operator Static member Subtraction Subtracts the value of one Duration from another.
Public operator Static member UnaryPlus Returns the specified Duration.
Top

Show:
© 2017 Microsoft