Enum 成员

为枚举提供基类。

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

受保护的构造函数

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

页首

公共方法

(请参见 受保护的方法 )

  名称 说明
Public method Supported by the .NET Compact Framework CompareTo 将此实例与指定对象进行比较并返回一个对二者的相对值的指示。
Public method Supported by the .NET Compact Framework Equals 已重载。 已重写。 返回一个值,该值指示此实例是否与指定的对象相等。
Public method Static Format 根据指定格式将指定枚举类型的指定值转换为其等效的字符串表示形式。
Public method Supported by the .NET Compact Framework GetHashCode 已重写。 返回该实例的值的哈希代码。
Public method Static GetName 在指定枚举中检索具有指定值的常数的名称。
Public method Static GetNames 检索指定枚举中常数名称的数组。
Public method Supported by the .NET Compact Framework GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework GetTypeCode 返回此实例的基础 TypeCode
Public method Static Supported by the .NET Compact Framework GetUnderlyingType 返回指定枚举的基础类型。
Public method Static GetValues 检索指定枚举中常数值的数组。
Public method Static Supported by the .NET Compact Framework IsDefined 返回指定枚举中是否存在具有指定值的常数的指示。
Public method Static Supported by the .NET Compact Framework Parse 已重载。 将一个或多个枚举常数的名称或数字值的字符串表示转换成等效的枚举对象。
Public method Static Supported by the .NET Compact Framework ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method Static Supported by the .NET Compact Framework ToObject 已重载。 返回设置为指定值的、指定枚举类型的实例。
Public method Supported by the .NET Compact Framework ToString 已重载。 已重写。 将此实例的值转换为其等效的字符串表示。

页首

受保护的方法

  名称 说明
Protected method Supported by the .NET Compact Framework Finalize  允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。 (从 Object 继承。)
Protected method Supported by the .NET Compact Framework MemberwiseClone  创建当前 Object 的浅表副本。 (从 Object 继承。)

页首

显式接口实现

  名称 说明
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToBoolean 根据基础类型将当前值转换为布尔值。
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToByte 根据基础类型将当前值转换为 8 位无符号整数。
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToChar 根据基础类型将当前值转换为 Unicode 字符。
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToDateTime 根据基础类型将当前值转换为 DateTime
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToDecimal 根据基础类型将当前值转换为 Decimal
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToDouble 根据基础类型将当前值转换为双精度浮点数。
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToInt16 根据基础类型将当前值转换为 16 位有符号整数。
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToInt32 根据基础类型将当前值转换为 32 位有符号整数。
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToInt64 根据基础类型将当前值转换为 64 位有符号整数。
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToSByte 根据基础类型将当前值转换为 8 位有符号整数。
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToSingle 根据基础类型将当前值转换为单精度浮点数。
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToString  
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToType 根据基础类型将当前值转换为指定类型。
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToUInt16 根据基础类型将当前值转换为 16 位无符号整数。
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToUInt32 根据基础类型将当前值转换为 32 位无符号整数。
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToUInt64 根据基础类型将当前值转换为 64 位无符号整数。

页首

请参见

参考

Enum 结构
System 命名空间
ValueType
FlagsAttribute
Char 结构
Int32