カスタムの型記述子を使用して、指定したコンポーネントの型の型コンバータを取得します。
Overloads Public Shared Function GetConverter( _
ByVal component As Object, _ ByVal noCustomTypeDesc As Boolean _) As TypeConverter
[C#]
public static TypeConverter GetConverter(objectcomponent,boolnoCustomTypeDesc);
[C++]
public: static TypeConverter* GetConverter(Object* component,boolnoCustomTypeDesc);
[JScript]
public static function GetConverter(
component : Object,noCustomTypeDesc : Boolean) : TypeConverter;
パラメータ
- component
コンバータを取得する対象のコンポーネント。 - noCustomTypeDesc
ICustomTypeDescriptor のインスタンスが TypeDescriptor を呼び出す場合は true 。それ以外の場合は false 。
戻り値
指定したコンポーネントの TypeConverter 。 TypeConverter が見つからない場合は null 参照 (Visual Basic では Nothing) 。
例外
例外の種類 | 条件 |
---|---|
ArgumentNullException | 指定したコンポーネントが null 参照 (Visual Basic では Nothing) です。 |
解説
このメソッドは、 TypeConverterAttribute を検索することにより、適切な型コンバータを検索します。 TypeConverterAttribute が見つからない場合は、プリミティブ型が見つかるまで、クラスの基本クラス階層が検索されます。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
TypeDescriptor クラス | TypeDescriptor メンバ | System.ComponentModel 名前空間 | TypeDescriptor.GetConverter オーバーロードの一覧 | TypeDescriptor | EventDescriptor | PropertyDescriptor | ICustomTypeDescriptor