TimeOnly.ToString Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |
- 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
.NET 10 и други версии
Продукт | Версии |
---|---|
.NET | 6, 7, 8, 9, 10 |
- 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
.NET 10 и други версии
Продукт | Версии |
---|---|
.NET | 6, 7, 8, 9, 10 |
- 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
.NET 10 и други версии
Продукт | Версии |
---|---|
.NET | 6, 7, 8, 9, 10 |
- 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
.NET 10 и други версии
Продукт | Версии |
---|---|
.NET | 6, 7, 8, 9, 10 |
Обратна връзка за .NET
.NET е проект с отворен код. Изберете връзка, за да предоставите обратна връзка: