IConvertible 成员

定义特定的方法,这些方法将实现引用或值类型的值转换为具有等效值的公共语言运行库类型。

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

公共方法

  名称 说明
Public method Supported by the .NET Compact Framework GetTypeCode 返回此实例的 TypeCode
Public method Supported by the .NET Compact Framework ToBoolean 使用指定的区域性特定格式设置信息将此实例的值转换为等效的 Boolean 值。
Public method Supported by the .NET Compact Framework ToByte 使用指定的区域性特定格式设置信息将该实例的值转换为等效的 8 位无符号整数。
Public method Supported by the .NET Compact Framework ToChar 使用指定的区域性特定格式设置信息将此实例的值转换为等效的 Unicode 字符。
Public method Supported by the .NET Compact Framework ToDateTime 使用指定的区域性特定格式设置信息将此实例的值转换为等效的 DateTime
Public method Supported by the .NET Compact Framework ToDecimal 使用指定的区域性特定格式设置信息将此实例的值转换为等效的 Decimal 数字。
Public method Supported by the .NET Compact Framework ToDouble 使用指定的区域性特定格式设置信息将此实例的值转换为等效的双精度浮点数字。
Public method Supported by the .NET Compact Framework ToInt16 使用指定的区域性特定格式设置信息将此实例的值转换为等效的 16 位有符号整数。
Public method Supported by the .NET Compact Framework ToInt32 使用指定的区域性特定格式设置信息将此实例的值转换为等效的 32 位有符号整数。
Public method Supported by the .NET Compact Framework ToInt64 使用指定的区域性特定格式设置信息将此实例的值转换为等效的 64 位有符号整数。
Public method Supported by the .NET Compact Framework ToSByte 使用指定的区域性特定格式设置信息将此实例的值转换为等效的 8 位有符号整数。
Public method Supported by the .NET Compact Framework ToSingle 使用指定的区域性特定格式设置信息将此实例的值转换为等效的单精度浮点数字。
Public method Supported by the .NET Compact Framework ToString 使用指定的区域性特定格式设置信息将此实例的值转换为等效的 String
Public method Supported by the .NET Compact Framework ToType 使用指定的区域性特定格式设置信息将此实例的值转换为具有等效值的指定 TypeObject
Public method Supported by the .NET Compact Framework ToUInt16 使用指定的区域性特定格式设置信息将该实例的值转换为等效的 16 位无符号整数。
Public method Supported by the .NET Compact Framework ToUInt32 使用指定的区域性特定格式设置信息将该实例的值转换为等效的 32 位无符号整数。
Public method Supported by the .NET Compact Framework ToUInt64 使用指定的区域性特定格式设置信息将该实例的值转换为等效的 64 位无符号整数。

页首

请参见

参考

IConvertible 接口
System 命名空间