Redigera

Dela via


StringArrayConverter.ConvertFrom Method

Definition

Converts the specified comma-separated string into an array of strings.

public:
 override System::Object ^ ConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value);
public override object ConvertFrom (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value);
override this.ConvertFrom : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj -> obj
Public Overrides Function ConvertFrom (context As ITypeDescriptorContext, culture As CultureInfo, value As Object) As Object

Parameters

context
ITypeDescriptorContext

An ITypeDescriptorContext object that provides a format context that can be used to extract additional information about the environment from which this converter is invoked. This parameter or properties of this parameter can be null.

culture
CultureInfo

A CultureInfo object. If null, the current culture is used.

value
Object

The Object to convert.

Returns

An Object that represents the converted value.

Exceptions

The conversion cannot be performed because value is not a string.

Remarks

The ConvertFrom method parses an object that represents a comma-separated string into an array of strings. Prior to calling this method, you can call the CanConvertFrom method to determine whether the object specified by value can be converted to an array of strings.

To convert an array of strings into a comma-separated string, use the ConvertTo method.

Applies to

See also