Duration MembersNoda Time

The Duration type exposes the following members.
Methods

  NameDescription
Public methodStatic memberAdd
Adds one duration to another. Friendly alternative to operator+().
Public methodCompareTo
Compares the current object with another object of the same type.
Public methodStatic memberDivide
Divides a duration by a number. Friendly alternative to operator/().
Public methodEquals(Object)
Determines whether the specified OnlineObject is equal to this instance.
(Overrides OnlineValueType Equals(Object).)
Public methodEquals(Duration)
Indicates whether the current object is equal to another object of the same type.
Public methodStatic memberFromHours
Returns a Duration that represents the given number of hours.
Public methodStatic memberFromMilliseconds
Returns a Duration that represents the given number of milliseconds.
Public methodStatic memberFromMinutes
Returns a Duration that represents the given number of minutes.
Public methodStatic memberFromSeconds
Returns a Duration that represents the given number of seconds.
Public methodStatic memberFromStandardDays
Returns a Duration that represents the given number of days, assuming a 'standard' 24-hour day.
Public methodStatic memberFromStandardWeeks
Returns a Duration that represents the given number of weeks, assuming a 'standard' week consisting of seven 24-hour days.
Public methodStatic memberFromTicks
Returns a Duration that represents the given number of ticks.
Public methodStatic memberFromTimeSpan
Returns a Duration that represents the same number of ticks as the given OnlineTimeSpan.
Public methodGetHashCode
Returns a hash code for this instance.
(Overrides OnlineValueType GetHashCode .)
Public methodMinus
Returns the result of subtracting another duration from this one, for a fluent alternative to operator-().
Public methodStatic memberMultiply(Int64, Duration)
Multiplies a duration by a number. Friendly alternative to operator*().
Public methodStatic memberMultiply(Duration, Int64)
Multiplies a duration by a number. Friendly alternative to operator*().
Public methodStatic memberNegate
Implements a friendly alternative to the unary negation operator.
Public methodPlus
Returns the result of adding another duration to this one, for a fluent alternative to operator+().
Public methodStatic memberSubtract
Subtracts one duration from another. Friendly alternative to operator-().
Public methodToString 
Returns a OnlineString that represents this instance.
(Overrides OnlineValueType ToString .)
Public methodToString(String, IFormatProvider)
Formats the value of the current instance using the specified pattern.
Public methodToTimeSpan
Returns a OnlineTimeSpan that represents the same number of ticks as this Duration.
Back to Top
Operators

  NameDescription
Public operatorStatic memberAddition
Implements the operator + (addition).
Public operatorStatic memberDivision
Implements the operator / (division).
Public operatorStatic memberEquality
Implements the operator == (equality).
Public operatorStatic memberGreaterThan
Implements the operator > (greater than).
Public operatorStatic memberGreaterThanOrEqual
Implements the operator >= (greater than or equal).
Public operatorStatic memberInequality
Implements the operator != (inequality).
Public operatorStatic memberLessThan
Implements the operator < (less than).
Public operatorStatic memberLessThanOrEqual
Implements the operator <= (less than or equal).
Public operatorStatic memberMultiply(Int64, Duration)
Implements the operator * (multiplication).
Public operatorStatic memberMultiply(Duration, Int64)
Implements the operator * (multiplication).
Public operatorStatic memberSubtraction
Implements the operator - (subtraction).
Public operatorStatic memberUnaryNegation
Implements the unary negation operator.
Back to Top
Fields

  NameDescription
Public fieldStatic memberEpsilon
Represents the Duration value equals to 1 tick; the smallest amount by which an instant can vary. This field is read-only.
Public fieldStatic memberZero
Represents the zero Duration value. This field is read-only.
Back to Top
Properties

  NameDescription
Public propertyTicks
The total number of ticks in the duration.
Back to Top
See Also