Back to Devexpress

HumanReadableTimeSpanHelper.ToString(TimeSpan) Method

corelibraries-devexpress-dot-xtrascheduler-dot-native-dot-humanreadabletimespanhelper-dot-tostring-x28-system-dot-timespan-x29.md

latest2.5 KB
Original Source

HumanReadableTimeSpanHelper.ToString(TimeSpan) Method

Converts the specified TimeSpan value to a string.

Namespace : DevExpress.XtraScheduler.Native

Assembly : DevExpress.XtraScheduler.v25.2.Core.Desktop.dll

NuGet Package : DevExpress.Scheduler.CoreDesktop

Declaration

csharp
public static string ToString(
    TimeSpan val
)
vb
Public Shared Function ToString(
    val As TimeSpan
) As String

Parameters

NameTypeDescription
valTimeSpan

A TimeSpan value to convert.

|

Returns

TypeDescription
String

A String value that is the text representation of the time span. If the specified time span cannot be converted to a string, the Empty value is returned.

|

Remarks

The ToString method uses SchedulerStringId values for format strings and abbreviations, so the result is localizable. To modify localizable strings, use the standard localization technique described in the Localization topic.

To implement a custom conversion procedure, handle the HumanReadableTimeSpanHelper.ConvertToString event.

See Also

Parse(String)

HumanReadableTimeSpanHelper Class

HumanReadableTimeSpanHelper Members

DevExpress.XtraScheduler.Native Namespace