System.ComponentModel.TypeDescriptor.GetConverter C# (CSharp) Method

GetConverter() public static method

Gets a type converter for the type of the specified component.
public static GetConverter ( object component ) : TypeConverter
component object
return TypeConverter
        public static TypeConverter GetConverter(object component)
        {
            return GetConverter(component, false);
        }
        /// <summary>

Same methods

TypeDescriptor::GetConverter ( Type type ) : TypeConverter
TypeDescriptor::GetConverter ( object component, bool noCustomTypeDesc ) : TypeConverter

Usage Example

Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NameableConverter"/> class.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <exception cref="System.ArgumentException">NameableConverterBadCtorArg - type</exception>
 public NameableConverter(Type type)
 {
     NameableType            = type;
     UnderlyingType          = Nameable.GetUnderlyingType(type) ?? throw new ArgumentException(nameof(type), "type");
     UnderlyingTypeConverter = TypeDescriptor.GetConverter(UnderlyingType);
 }
All Usage Examples Of System.ComponentModel.TypeDescriptor::GetConverter