MatrixConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) 方法

定义

尝试将指定对象转换为 MatrixAttempts to convert the specified object to a Matrix.

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

参数

context
ITypeDescriptorContext

类型的上下文信息。The context information of a type.

culture
CultureInfo

要转换的类型的 CultureInfoThe CultureInfo of the type being converted.

value
Object

要转换的对象。The object being converted.

返回

Object

通过转换 value 创建的 MatrixThe Matrix created from converting value.

例外

指定的对象为 Null 或者为无法转换为 Matrix 的类型。The specified object is null or is a type that cannot be converted to a Matrix.

注解

若要确定是否可以转换,而无需实际执行转换,请使用 CanConvertFrom 方法。To determine whether a conversion is possible without actually performing the conversion, use the CanConvertFrom method.

适用于