Conversions.ToString Metodo

Definizione

Converte l'oggetto specificato in un String valore.

Overload

Nome Descrizione
ToString(Int64)

Converte un Long valore in un String valore.

ToString(Single, NumberFormatInfo)

Converte un Single valore in un String valore utilizzando il formato numerico specificato.

ToString(Double, NumberFormatInfo)

Converte un Double valore in un String valore utilizzando il formato numerico specificato.

ToString(Decimal, NumberFormatInfo)

Converte un Decimal valore in un String valore utilizzando il formato numerico specificato.

ToString(UInt64)

Converte un Ulong valore in un String valore.

ToString(UInt32)

Converte un uint valore in un String valore.

ToString(Single)

Converte un Single valore (un numero a virgola mobile a precisione singola) in un String valore.

ToString(Object)

Converte un oggetto in un String valore.

ToString(Int32)

Converte un valore intero in un String valore .

ToString(Int16)

Converte un Short valore in un String valore.

ToString(Double)

Converte un Double valore in un String valore.

ToString(Decimal)

Converte un Decimal valore in un String valore.

ToString(DateTime)

Converte un DateTime valore in un String valore.

ToString(Char)

Converte un Char valore in un oggetto String.

ToString(Byte)

Converte un Byte valore in un oggetto String.

ToString(Boolean)

Converte un Boolean valore in un oggetto String.

ToString(Int64)

Converte un Long valore in un String valore.

public:
 static System::String ^ ToString(long Value);
public static string ToString(long Value);
static member ToString : int64 -> string
Public Shared Function ToString (Value As Long) As String

Parametri

Value
Int64

Valore Long da convertire.

Valori restituiti

Rappresentazione String del Long valore.

Si applica a

ToString(Single, NumberFormatInfo)

Converte un Single valore in un String valore utilizzando il formato numerico specificato.

public:
 static System::String ^ ToString(float Value, System::Globalization::NumberFormatInfo ^ NumberFormat);
public static string ToString(float Value, System.Globalization.NumberFormatInfo NumberFormat);
static member ToString : single * System.Globalization.NumberFormatInfo -> string
Public Shared Function ToString (Value As Single, NumberFormat As NumberFormatInfo) As String

Parametri

Value
Single

Valore Single da convertire.

NumberFormat
NumberFormatInfo

Formato numerico da utilizzare, in base a NumberFormatInfo.

Valori restituiti

Rappresentazione di stringa del Single valore.

Si applica a

ToString(Double, NumberFormatInfo)

Converte un Double valore in un String valore utilizzando il formato numerico specificato.

public:
 static System::String ^ ToString(double Value, System::Globalization::NumberFormatInfo ^ NumberFormat);
public static string ToString(double Value, System.Globalization.NumberFormatInfo NumberFormat);
static member ToString : double * System.Globalization.NumberFormatInfo -> string
Public Shared Function ToString (Value As Double, NumberFormat As NumberFormatInfo) As String

Parametri

Value
Double

Valore Double da convertire.

NumberFormat
NumberFormatInfo

Formato numerico da utilizzare, in base a NumberFormatInfo.

Valori restituiti

Rappresentazione di stringa del Double valore.

Si applica a

ToString(Decimal, NumberFormatInfo)

Converte un Decimal valore in un String valore utilizzando il formato numerico specificato.

public:
 static System::String ^ ToString(System::Decimal Value, System::Globalization::NumberFormatInfo ^ NumberFormat);
public static string ToString(decimal Value, System.Globalization.NumberFormatInfo NumberFormat);
static member ToString : decimal * System.Globalization.NumberFormatInfo -> string
Public Shared Function ToString (Value As Decimal, NumberFormat As NumberFormatInfo) As String

Parametri

Value
Decimal

Valore decimal da convertire.

NumberFormat
NumberFormatInfo

Formato numerico da utilizzare, in base a NumberFormatInfo.

Valori restituiti

Rappresentazione String del Decimal valore.

Si applica a

ToString(UInt64)

Importante

Questa API non è conforme a CLS.

Alternativa conforme a CLS
Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Int64)

Converte un Ulong valore in un String valore.

public:
 static System::String ^ ToString(System::UInt64 Value);
[System.CLSCompliant(false)]
public static string ToString(ulong Value);
[<System.CLSCompliant(false)>]
static member ToString : uint64 -> string
Public Shared Function ToString (Value As ULong) As String

Parametri

Value
UInt64

Valore Ulong da convertire.

Valori restituiti

Rappresentazione String del Ulong valore.

Attributi

Si applica a

ToString(UInt32)

Importante

Questa API non è conforme a CLS.

Alternativa conforme a CLS
Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Int32)

Converte un uint valore in un String valore.

public:
 static System::String ^ ToString(System::UInt32 Value);
[System.CLSCompliant(false)]
public static string ToString(uint Value);
[<System.CLSCompliant(false)>]
static member ToString : uint32 -> string
Public Shared Function ToString (Value As UInteger) As String

Parametri

Value
UInt32

Valore Uint da convertire.

Valori restituiti

Rappresentazione String del Uint valore.

Attributi

Si applica a

ToString(Single)

Converte un Single valore (un numero a virgola mobile a precisione singola) in un String valore.

public:
 static System::String ^ ToString(float Value);
public static string ToString(float Value);
static member ToString : single -> string
Public Shared Function ToString (Value As Single) As String

Parametri

Value
Single

Valore Single da convertire.

Valori restituiti

Rappresentazione di stringa del Single valore.

Si applica a

ToString(Object)

Converte un oggetto in un String valore.

public:
 static System::String ^ ToString(System::Object ^ Value);
public static string ToString(object Value);
static member ToString : obj -> string
Public Shared Function ToString (Value As Object) As String

Parametri

Value
Object

Oggetto da convertire.

Valori restituiti

Rappresentazione String dell'oggetto .

Si applica a

ToString(Int32)

Converte un valore intero in un String valore .

public:
 static System::String ^ ToString(int Value);
public static string ToString(int Value);
static member ToString : int -> string
Public Shared Function ToString (Value As Integer) As String

Parametri

Value
Int32

Valore int da convertire.

Valori restituiti

Rappresentazione String del int valore.

Si applica a

ToString(Int16)

Converte un Short valore in un String valore.

public:
 static System::String ^ ToString(short Value);
public static string ToString(short Value);
static member ToString : int16 -> string
Public Shared Function ToString (Value As Short) As String

Parametri

Value
Int16

Valore Short da convertire.

Valori restituiti

Rappresentazione String del Short valore.

Si applica a

ToString(Double)

Converte un Double valore in un String valore.

public:
 static System::String ^ ToString(double Value);
public static string ToString(double Value);
static member ToString : double -> string
Public Shared Function ToString (Value As Double) As String

Parametri

Value
Double

Valore Double da convertire.

Valori restituiti

Rappresentazione di stringa del Double valore.

Si applica a

ToString(Decimal)

Converte un Decimal valore in un String valore.

public:
 static System::String ^ ToString(System::Decimal Value);
public static string ToString(decimal Value);
static member ToString : decimal -> string
Public Shared Function ToString (Value As Decimal) As String

Parametri

Value
Decimal

Valore Decimal da convertire.

Valori restituiti

Rappresentazione String del Decimal valore.

Si applica a

ToString(DateTime)

Converte un DateTime valore in un String valore.

public:
 static System::String ^ ToString(DateTime Value);
public static string ToString(DateTime Value);
static member ToString : DateTime -> string
Public Shared Function ToString (Value As DateTime) As String

Parametri

Value
DateTime

Valore DateTime da convertire.

Valori restituiti

Rappresentazione String del DateTime valore.

Si applica a

ToString(Char)

Converte un Char valore in un oggetto String.

public:
 static System::String ^ ToString(char Value);
public static string ToString(char Value);
static member ToString : char -> string
Public Shared Function ToString (Value As Char) As String

Parametri

Value
Char

Valore Char da convertire.

Valori restituiti

Rappresentazione String del Char valore.

Si applica a

ToString(Byte)

Converte un Byte valore in un oggetto String.

public:
 static System::String ^ ToString(System::Byte Value);
public static string ToString(byte Value);
static member ToString : byte -> string
Public Shared Function ToString (Value As Byte) As String

Parametri

Value
Byte

Valore Byte da convertire.

Valori restituiti

Rappresentazione String del Byte valore.

Si applica a

ToString(Boolean)

Converte un Boolean valore in un oggetto String.

public:
 static System::String ^ ToString(bool Value);
public static string ToString(bool Value);
static member ToString : bool -> string
Public Shared Function ToString (Value As Boolean) As String

Parametri

Value
Boolean

Valore Boolean da convertire.

Valori restituiti

Rappresentazione String del Boolean valore.

Si applica a