Show / Hide Table of Contents

Class TimeSpanExtensions

Contains useful extensions for the TimeSpan structure.

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

Methods

| Edit this page View Source

AsTime(in TimeSpan)

Converts a TimeSpan to its time representation.

Declaration
public static string AsTime(this in TimeSpan timeSpan)
Parameters
Type Name Description
TimeSpan timeSpan

Value to convert.

Returns
Type Description
string

A string representing the time value.

| Edit this page View Source

AsTime(in TimeSpan, in CultureInfo)

Converts a TimeSpan to its time representation.

Declaration
public static string AsTime(this in TimeSpan timeSpan, in CultureInfo culture)
Parameters
Type Name Description
TimeSpan timeSpan

Value to convert.

CultureInfo culture

The culture to use for formatting the time string.

Returns
Type Description
string

A string representing the time value.

| Edit this page View Source

Verbose(in TimeSpan)

Converts a TimeSpan into a human-readable string.

Declaration
public static string Verbose(this in TimeSpan timeSpan)
Parameters
Type Name Description
TimeSpan timeSpan

Value to convert.

Returns
Type Description
string

A user-friendly string indicating the days, hours, minutes, and seconds components of timeSpan.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX