Skip to content
CShift0.32

Enum<T>

Struct · built-in type

struct Enum<T>

Facts about an enum type, all of them constants (usable in other constants too).

for (var i = 0; i < Enum<Color>.Count; i += 1)
Console.WriteLine(Enum<Color>.Names[i] + " = " + (int)Enum<Color>.Values[i]);
Name Description
Count The number of declared members (members that share a value count separately).
Min The smallest value.
Max The largest value.
Values All members in declaration order.
Names The names of the members, in declaration order.
static int Count

The number of declared members (members that share a value count separately).

static T Min

The smallest value.

static T Max

The largest value.

static ReadOnlySlice<T> Values

All members in declaration order.

static ReadOnlySlice<string> Names

The names of the members, in declaration order.