TypeConverter 成员

提供一种将值的类型转换为其他类型以及访问标准值和子属性的统一方法。

下表列出了由 TypeConverter 类型公开的成员。

公共构造函数

  名称 说明
Public method Supported by the .NET Compact Framework TypeConverter 初始化 TypeConverter 类的新实例。

页首

公共方法

(请参见 受保护的方法 )

  名称 说明
Public method CanConvertFrom 已重载。 返回该转换器是否可以将一种类型的对象转换为此转换器的类型。
Public method CanConvertTo 已重载。 返回此转换器是否可将该对象转换为指定的类型。
Public method ConvertFrom 已重载。 将给定值转换为此转换器的类型。
Public method ConvertFromInvariantString 已重载。 使用不变区域性将该值转换为此转换器的类型。
Public method ConvertFromString 已重载。 将指定文本转换为对象。
Public method ConvertTo 已重载。 将给定值对象转换为指定的类型。
Public method ConvertToInvariantString 已重载。 将指定值转换为区域性不变的字符串表示形式。
Public method ConvertToString 已重载。 将指定值转换为字符串表示形式。
Public method CreateInstance 已重载。 在给定 Object 的一组属性值的情况下重新创建该对象。
Public method Supported by the .NET Compact Framework Equals  已重载。 确定两个 Object 实例是否相等。 (从 Object 继承。)
Public method GetCreateInstanceSupported 已重载。 返回更改此对象的值是否要求调用 CreateInstance 方法来创建新值。
Public method Supported by the .NET Compact Framework GetHashCode  用作特定类型的哈希函数。GetHashCode 适合在哈希算法和数据结构(如哈希表)中使用。 (从 Object 继承。)
Public method GetProperties 已重载。 返回由值参数指定的数组类型的属性 (Property) 集合。
Public method GetPropertiesSupported 已重载。 返回此对象是否支持属性。
Public method GetStandardValues 已重载。 返回此类型转换器设计用于的数据类型的标准值集合。
Public method GetStandardValuesExclusive 已重载。 返回从 GetStandardValues 返回的标准值的集合是否为独占列表。
Public method GetStandardValuesSupported 已重载。 返回此对象是否支持可以从列表中选取的标准值集。
Public method Supported by the .NET Compact Framework GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method IsValid 已重载。 返回给定值对象对于此类型是否有效。
Public method Static Supported by the .NET Compact Framework ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework ToString  返回表示当前 ObjectString。 (从 Object 继承。)

页首

受保护的方法

  名称 说明
Protected method Supported by the .NET Compact Framework Finalize  允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。 (从 Object 继承。)
Protected method GetConvertFromException 返回无法执行转换时引发的异常。
Protected method GetConvertToException 返回无法执行转换时引发的异常。
Protected method Supported by the .NET Compact Framework MemberwiseClone  创建当前 Object 的浅表副本。 (从 Object 继承。)
Protected method SortProperties 对属性 (Property) 的集合进行排序。

页首

请参见

参考

TypeConverter 类
System.ComponentModel 命名空间
TypeConverterAttribute
PropertyDescriptorCollection 类
TypeConverter.SimplePropertyDescriptor
TypeConverter.StandardValuesCollection