StringArrayConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) 方法
定义
将字符串数组转换为由逗号分隔的值组成的字符串。Converts an array of strings into a string of values separated by commas.
public:
override System::Object ^ ConvertTo(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value, Type ^ destinationType);
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType);
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
Public Overrides Function ConvertTo (context As ITypeDescriptorContext, culture As CultureInfo, value As Object, destinationType As Type) As Object
参数
- context
- ITypeDescriptorContext
一个提供格式上下文的 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. 此参数或其属性可以为 null。This parameter or properties of this parameter can be null.
- culture
- CultureInfo
CultureInfo 对象。A CultureInfo object. 如果为 null,则使用当前区域性。If null, the current culture is used.
返回
表示转换的 value 的 Object 实例。An Object instance that represents the converted value.
例外
注解
ConvertTo方法将字符串数组转换为以逗号分隔的字符串。The ConvertTo method converts an array of strings into a comma-separated string.
若要将逗号分隔的字符串转换为字符串数组,请使用 ConvertFrom 方法。To convert a comma-separated string into an array of strings, use the ConvertFrom method.