C#: are ranges possible with enums?

Posted by Craig Johnston on Stack Overflow See other posts from Stack Overflow or by Craig Johnston
Published on 2010-05-06T04:38:24Z Indexed on 2010/05/06 4:48 UTC
Read the original article Hit count: 299

Filed under:
|

In C#, can you use number ranges in enum types, for example

public enum BookType
{
    Novel = 1,
    Journal = 2,
    Reference = 3,
    TextBook = 4 .. 10
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about enums