GetConverter() 공개 정적인 메소드

Gets a type converter for the specified type.
public static GetConverter ( Type type ) : TypeConverter
type System.Type
리턴 TypeConverter
예제 #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);
 }
예제 #2
0
 public override string ToString()
 {
     return(TypeDescriptor.GetConverter(typeof(System.ComponentModel.InheritanceLevel)).ConvertToString(this.InheritanceLevel));
 }
예제 #3
0
 public TypeConverter GetConverter() => NativeTypeDesc.GetConverter(_entityType, true);