Home All Groups Group Topic Archive Search About

Viewing enum values in a specific order?

Author
29 Mar 2006 11:34 PM
mrmagoo
Is it possible to view enum values in the order that I have defined them?

Public Enum Size
   Small
   Medium
   Large
   Biggest
End Enum

I love Enums because they make my life easier, but, because they are
alphabetized, it seems easier to make a mistake and pick the wrong one. When
I assign a value from this enumeration, I think "I'll pick the last one
because that's the biggest", but the I have to do a double-take and search
within the list because they have been alphabetized.

Is there a way to preserve the original list order?

Author
30 Mar 2006 10:31 AM
Carlos J. Quintero [VB MVP]
AFAIK, no.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com


Show quoteHide quote
"mrmagoo" <-> escribió en el mensaje
news:%23oKuZl4UGHA.6084@TK2MSFTNGP14.phx.gbl...
> Is it possible to view enum values in the order that I have defined them?
>
> Public Enum Size
>   Small
>   Medium
>   Large
>   Biggest
> End Enum
>
> I love Enums because they make my life easier, but, because they are
> alphabetized, it seems easier to make a mistake and pick the wrong one.
> When
> I assign a value from this enumeration, I think "I'll pick the last one
> because that's the biggest", but the I have to do a double-take and search
> within the list because they have been alphabetized.
>
> Is there a way to preserve the original list order?
>
>
>