Redigera

Dela via


TimeOnly.ToString Method

Definition

Overloads

ToString(String, IFormatProvider)

Converts the value of the current TimeOnly instance to its equivalent string representation using the specified culture-specific format information.

ToString(String)

Converts the current TimeOnly instance to its equivalent string representation using the specified format and the formatting conventions of the current culture.

ToString()

Converts the current TimeOnly instance to its equivalent short time string representation using the formatting conventions of the current culture.

ToString(IFormatProvider)

Converts the value of the current TimeOnly instance to its equivalent string representation using the specified culture-specific format information.

ToString(String, IFormatProvider)

Source:
TimeOnly.cs
Source:
TimeOnly.cs
Source:
TimeOnly.cs

Converts the value of the current TimeOnly instance to its equivalent string representation using the specified culture-specific format information.

public:
 virtual System::String ^ ToString(System::String ^ format, IFormatProvider ^ provider);
public string ToString (string? format, IFormatProvider? provider);
override this.ToString : string * IFormatProvider -> string
Public Function ToString (format As String, provider As IFormatProvider) As String

Parameters

format
String

A standard or custom time format string.

provider
IFormatProvider

The culture-specific formatting information.

Returns

A string representation of value of the current instance.

Implements

Remarks

The accepted standard formats are 'r', 'R', 'o', 'O', 't' and 'T'.

Applies to

ToString(String)

Source:
TimeOnly.cs
Source:
TimeOnly.cs
Source:
TimeOnly.cs

Converts the current TimeOnly instance to its equivalent string representation using the specified format and the formatting conventions of the current culture.

public:
 System::String ^ ToString(System::String ^ format);
public string ToString (string? format);
override this.ToString : string -> string
Public Function ToString (format As String) As String

Parameters

format
String

A standard or custom time format string.

Returns

A string representation of the current instance with the specified format and the formatting conventions of the current culture.

Remarks

The accepted standard formats are 'r', 'R', 'o', 'O', 't' and 'T'.

Applies to

ToString()

Source:
TimeOnly.cs
Source:
TimeOnly.cs
Source:
TimeOnly.cs

Converts the current TimeOnly instance to its equivalent short time string representation using the formatting conventions of the current culture.

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

Returns

The short time string representation of the current instance.

Applies to

ToString(IFormatProvider)

Source:
TimeOnly.cs
Source:
TimeOnly.cs
Source:
TimeOnly.cs

Converts the value of the current TimeOnly instance to its equivalent string representation using the specified culture-specific format information.

public:
 System::String ^ ToString(IFormatProvider ^ provider);
public string ToString (IFormatProvider? provider);
override this.ToString : IFormatProvider -> string
Public Function ToString (provider As IFormatProvider) As String

Parameters

provider
IFormatProvider

The culture-specific formatting information.

Returns

A string representation of the current instance as specified by the provider.

Applies to