Class TimeSpanExtensions
Contains useful extensions for the TimeSpan structure.
Inherited Members
Namespace: TheXDS.MCART.Types.Extensions
Assembly: MCART.dll
Syntax
public static class TimeSpanExtensions
Methods
| Edit this page View SourceAsTime(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. |
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. |
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 |