• Advertisement
Sign in to follow this  

c# Enum with decimals?

This topic is 4714 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
No.

From the MSDN:
Quote:
An enumeration (enum) is a special form of value type, which inherits from System.Enum and supplies alternate names for the values of an underlying primitive type. An enumeration type has a name, an underlying type, and a set of fields. The underlying type must be one of the built-in signed or unsigned integer types (such as Byte, Int32, or UInt64). The fields are static literal fields, each of which represents a constant. The same value can be assigned to multiple fields. When this occurs, you must mark one of the values as the primary enumeration value for purposes of reflection and string conversion.

Share this post


Link to post
Share on other sites
Or you could use (decimal) fixed point numbers and convert them when used.
At least I've done that a few times..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement