System.ComponentModel.StringConverter Class

Provides a type converter to convert string objects to and from other representations.

See Also: StringConverter


public class StringConverter : TypeConverter


This converter can only convert to a string. It works as a pass through for other converters that want to convert an object to a string.

For more information about type converters, see the TypeConverter base class and How to: Implement a Type Converter.


You should never create an instance of StringConverter. Instead, call the TypeDescriptor.GetConverter(Object) method of TypeDescriptor. For more information, see the examples in the TypeConverter base class.


Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0,,

The members of System.ComponentModel.StringConverter are listed below.

See Also: TypeConverter

Public Constructors

Initializes a new instance of the StringConverter class.

Public Methods

CanConvertFrom(ITypeDescriptorContext, Type) : Boolean

Gets a value indicating whether this converter can convert an object in the given source type to a string using the specified context.

ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) : Object

Converts the specified value object to a String object.