Click or drag to resize

EnumConstant Class

Represents a constant value of a specified enum type, stored in the underlying type of the enum.
Inheritance Hierarchy
SystemObject
  Nova.CodeDOMEnumConstant

Namespace:  Nova.CodeDOM
Assembly:  Nova.CodeDOM (in Nova.CodeDOM.dll) Version: 7.44.8391.13415
Syntax
C#
public class EnumConstant

The EnumConstant type exposes the following members.

Constructors
  NameDescription
Public methodEnumConstant(Type, Object)
Create an EnumConstant.
Public methodEnumConstant(TypeRef, Object)
Create an EnumConstant.
Top
Properties
  NameDescription
Public propertyIsBitFlags
True if the EnumConstant belongs to a bit-flags enum.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldConstantValue
The constant value of the enum, as an object of the underlying type
Public fieldEnumTypeRef
The EnumDecl or TypeDefinition/Type representing the type of the enum.
Top
Remarks
This class is necessary because we can't dynamically create an instance of the enum type with the appropriate value since the type of the enum might be an EnumDecl, and we can't rely on being able to create a TypeDefinition/Type that represents such a declaration because there could possibly be compilation errors.
See Also