Gets a type converter for the type of the specified component.
[Visual Basic] Overloads Public Shared Function GetConverter( _ ByVal component As Object _ ) As TypeConverter [C#] public static TypeConverter GetConverter( object component ); [C++] public: static TypeConverter* GetConverter( Object* component ); [JScript] public static function GetConverter( component : Object ) : TypeConverter;
A TypeConverter for the specified component, or a null reference (in Visual Basic Nothing) if a TypeConverter cannot be found.
Exception Type | Condition |
---|---|
ArgumentNullException | Specified component is a null reference (Nothing). |
This method looks for the appropriate type converter by looking for a TypeConverterAttribute. If it cannot find a TypeConverterAttribute, it traverses the base class hierarchy of the class until a primitive type is found.
TypeDescriptor Class | TypeDescriptor Members | System.ComponentModel Namespace | TypeDescriptor.GetConverter Overload List | TypeDescriptor | EventDescriptor | PropertyDescriptor