指定したコンポーネントの型の型コンバータを取得します。
Overloads Public Shared Function GetConverter( _
ByVal component As Object _) As TypeConverter
[C#]
public static TypeConverter GetConverter(objectcomponent);
[C++]
public: static TypeConverter* GetConverter(Object* component);
[JScript]
public static function GetConverter(
component : Object) : TypeConverter;
パラメータ
- component
コンバータを取得する対象のコンポーネント。
戻り値
指定したコンポーネントの TypeConverter 。 TypeConverter が見つからない場合は null 参照 (Visual Basic では Nothing) 。
例外
例外の種類 | 条件 |
---|---|
ArgumentNullException | 指定したコンポーネントが null 参照 (Visual Basic では Nothing) です。 |
解説
このメソッドは、 TypeConverterAttribute を検索することにより、適切な型コンバータを検索します。 TypeConverterAttribute が見つからない場合は、プリミティブ型が見つかるまで、クラスの基本クラス階層が検索されます。
使用例
このメソッドの使い方の例については、 TypeConverter のトピックのサンプルを参照してください。
必要条件
プラットフォーム: 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