Редагувати

Поділитися через


StringArrayConverter.CanConvertFrom(ITypeDescriptorContext, Type) Method

Definition

Determines whether the StringArrayConverter can convert the specified source type to an array of strings.

public:
 override bool CanConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, Type ^ sourceType);
public override bool CanConvertFrom (System.ComponentModel.ITypeDescriptorContext context, Type sourceType);
override this.CanConvertFrom : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertFrom (context As ITypeDescriptorContext, sourceType As Type) As Boolean

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.

sourceType
Type

The Type to convert.

Returns

true if the converter can perform the operation; otherwise, false.

Remarks

The CanConvertFrom method determines whether the StringArrayConverter can convert the object specified by sourceType to an array of strings. Use this method prior to calling the ConvertFrom method to perform the conversion.

Applies to

See also