Groups | Blog | Home
all groups > dotnet general > november 2005 >

dotnet general : enum: min, max, count, random?


herbert
11/4/2005 2:21:02 PM
How can I get the minimum value, maximum value, the number of items in an
enum and a random value from an enum?
I intend to use an enum as a lookup table for randomly selected colours.
Or is enum the wrong choice? better use an array?

Guilherme Labigalini
11/4/2005 2:35:03 PM
Hi,

A good start point to take a look to "Enum" class. Enum class offers
methods to acess enum values and elements.

I think that the use of enum for a lookup table is a good choice, but I have
hundreads of elements conseider using an Array :)

--
[]''s
Guilherme Labigalini


[quoted text, click to view]
AddThis Social Bookmark Button