Convert.ToString Method

Definition

Converts values to String objects.

Overloads

ToString(Double)

This API supports the product infrastructure and is not intended to be used directly from your code.

Converts the specified Double to a String.

ToString(Boolean)

This API supports the product infrastructure and is not intended to be used directly from your code.

Converts the specified Boolean to a String.

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.

ToString(Double)

Converts the specified Double to a String.

This API supports the product infrastructure and is not intended to be used directly from your code.

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

ToString(Boolean)

Converts the specified Boolean to a String.

This API supports the product infrastructure and is not intended to be used directly from your code.

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

ToString(Object, Boolean)

Converts the specified Object to a String, optionally allowing data loss.

This API supports the product infrastructure and is not intended to be used directly from your code.

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