The Duration type exposes the following members.

Back to Top

Methods

Name | Description | |
---|---|---|

Add |
Adds one duration to another. Friendly alternative to operator+().
| |

CompareTo |
Compares the current object with another object of the same type.
| |

Divide |
Divides a duration by a number. Friendly alternative to operator/().
| |

Equals(Object) |
Determines whether the specified Object is equal to this instance.
(Overrides ValueType Equals(Object).) | |

Equals(Duration) |
Indicates whether the current object is equal to another object of the same type.
| |

FromHours |
Returns a Duration that represents the given number of hours.
| |

FromMilliseconds |
Returns a Duration that represents the given number of milliseconds.
| |

FromMinutes |
Returns a Duration that represents the given number of minutes.
| |

FromSeconds |
Returns a Duration that represents the given number of seconds.
| |

FromStandardDays |
Returns a Duration that represents the given number of days, assuming a 'standard' 24-hour
day.
| |

FromStandardWeeks |
Returns a Duration that represents the given number of weeks, assuming a 'standard' week
consisting of seven 24-hour days.
| |

FromTicks |
Returns a Duration that represents the given number of ticks.
| |

FromTimeSpan | ||

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

Minus |
Returns the result of subtracting another duration from this one, for a fluent alternative to operator-().
| |

Multiply(Int64, Duration) |
Multiplies a duration by a number. Friendly alternative to operator*().
| |

Multiply(Duration, Int64) |
Multiplies a duration by a number. Friendly alternative to operator*().
| |

Negate |
Implements a friendly alternative to the unary negation operator.
| |

Plus |
Returns the result of adding another duration to this one, for a fluent alternative to operator+().
| |

Subtract |
Subtracts one duration from another. Friendly alternative to operator-().
| |

ToString |
Returns a String that represents this instance.
(Overrides ValueType ToString .) | |

ToString(String, IFormatProvider) |
Formats the value of the current instance using the specified pattern.
| |

ToTimeSpan |

See Also