QueryStringConverter.ConvertValueToString(Object, Type) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Converte um parâmetro numa representação de uma cadeia de consulta.
public:
virtual System::String ^ ConvertValueToString(System::Object ^ parameter, Type ^ parameterType);
public virtual string ConvertValueToString(object parameter, Type parameterType);
abstract member ConvertValueToString : obj * Type -> string
override this.ConvertValueToString : obj * Type -> string
Public Overridable Function ConvertValueToString (parameter As Object, parameterType As Type) As String
Parâmetros
- parameter
- Object
O parâmetro a converter.
Devoluções
O nome e valor do parâmetro.
Exemplos
O código seguinte mostra como converter um valor tipado numa representação em cadeia do valor.
int value = 321;
string strValue = converter.ConvertValueToString(value, typeof(Int32));
Console.WriteLine("the value = {0}, the string representation of the value = {1}", value, strValue);
Dim value As Integer = 321
Dim strValue As String = converter.ConvertValueToString(value, GetType(Int32))
Console.WriteLine("the value = {0}, the string representation of the value = {1}", value, strValue)