Convert.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.
Converts values to String objects.
ToString(Double) |
This API supports the product infrastructure and is not intended to be used directly from your code. |
ToString(Boolean) |
This API supports the product infrastructure and is not intended to be used directly from your code. |
ToString(Object, Boolean) |
This API supports the product infrastructure and is not intended to be used directly from your code. Converts the specified Object to a String, optionally allowing data loss. |
public:
static System::String ^ ToString(double d);
public static string ToString(double d);
static member ToString : double -> string
Public Shared Function ToString (d As Double) As String
Parameters
- d
- Double
The value to convert.
Returns
d
converted to a String.
Applies to
.NET Framework 4.8.1 i inne wersje
Produkt | Wersje |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
public:
static System::String ^ ToString(bool b);
public static string ToString(bool b);
static member ToString : bool -> string
Public Shared Function ToString (b As Boolean) As String
Parameters
- b
- Boolean
The value to convert.
Returns
b
converted to a String.
Applies to
.NET Framework 4.8.1 i inne wersje
Produkt | Wersje |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
public:
static System::String ^ ToString(System::Object ^ value, bool explicitOK);
public static string ToString(object value, bool explicitOK);
static member ToString : obj * bool -> string
Public Shared Function ToString (value As Object, explicitOK As Boolean) As String
Parameters
- value
- Object
The value to convert.
- explicitOK
- Boolean
true
to allow data loss; otherwise, false
.
Returns
value
converted to a String.
Applies to
.NET Framework 4.8.1 i inne wersje
Produkt | Wersje |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Opinia o produkcie .NET
.NET to projekt typu open source. Wybierz link, aby przekazać opinię: