ConvertValueToString Method
Collapse the table of content
Expand the table of content

QueryStringConverter.ConvertValueToString Method (Object, Type)

 

Converts a parameter to a query string representation.

Namespace:   System.ServiceModel.Dispatcher
Assembly:  System.ServiceModel.Web (in System.ServiceModel.Web.dll)

public virtual string ConvertValueToString(
	object parameter,
	Type parameterType
)

Parameters

parameter
Type: System.Object

The parameter to convert.

parameterType
Type: System.Type

The Type of the parameter to convert.

Return Value

Type: System.String

The parameter name and value.

The following code shows how to convert a typed value into a string representation of the value.

int value = 321;
string strValue = converter.ConvertValueToString(value, typeof(Int32));
Console.WriteLine("the value = {0}, the string representation of the value = {1}", value, strValue);

.NET Framework
Available since 3.5
Silverlight
Available since 4.0
Return to top
Show:
© 2016 Microsoft