Show / Hide Table of Contents

Class TimeSpanExtensions

Provides extensions for TimeSpan data type.

Inheritance
object
TimeSpanExtensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public static class TimeSpanExtensions

Methods

View Source

Max(TimeSpan, TimeSpan)

Compares two values to compute which is greater.

Declaration
public static TimeSpan Max(TimeSpan x, TimeSpan y)
Parameters
Type Name Description
TimeSpan x

The first value to compare.

TimeSpan y

The second value to compare.

Returns
Type Description
TimeSpan

x if it's greater than y; otherwise, y.

View Source

Min(TimeSpan, TimeSpan)

Compares two values to compute which is lesser.

Declaration
public static TimeSpan Min(TimeSpan x, TimeSpan y)
Parameters
Type Name Description
TimeSpan x

The first value to compare.

TimeSpan y

The second value to compare.

Returns
Type Description
TimeSpan

x if it's less than y; otherwise, y.

  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾