対象のコンバータが、指定した変換前の型のオブジェクトをそのコンバータのネイティブな型に変換できるかどうかを示します。
Overrides Overloads Public Function CanConvertFrom( _
ByVal context As ITypeDescriptorContext, _ ByVal sourceType As Type _) As Boolean
[C#]
public override bool CanConvertFrom(ITypeDescriptorContextcontext,TypesourceType);
[C++]
public: bool CanConvertFrom(ITypeDescriptorContext* context,Type* sourceType);
[JScript]
public override function CanConvertFrom(
context : ITypeDescriptorContext,sourceType : Type) : Boolean;
パラメータ
- context
書式指定コンテキスト。このオブジェクトを使用して、このコンバータを呼び出している環境についての追加情報を取得できます。この値は null 参照 (Visual Basic では Nothing) になる場合があるため、常に確認してください。また、コンテキスト オブジェクト上のプロパティも null 参照 (Nothing) を返す場合があります。 - sourceType
変換前の型。
戻り値
オブジェクトが変換を実行できる場合、このメソッドは true を返します。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
ImageFormatConverter クラス | ImageFormatConverter メンバ | System.Drawing 名前空間 | ImageFormatConverter.CanConvertFrom オーバーロードの一覧