A
Alexander Muylaert
Hi
In delphi we can create an array of an enum.
type
TMyEnum = (meRed, meGreen, meBlue);
const
cMyArray : array[TMyEnum] of TColor = (clRed, clGreen, clBlue);
This has the huge advantage that the compiler will actually check if enough
elements are inside the array. It is also very easy to get an element.
Color = cMyArray[FEnum];
Is there a way this can be accomplished in C#?
Kind regards
Alexander
In delphi we can create an array of an enum.
type
TMyEnum = (meRed, meGreen, meBlue);
const
cMyArray : array[TMyEnum] of TColor = (clRed, clGreen, clBlue);
This has the huge advantage that the compiler will actually check if enough
elements are inside the array. It is also very easy to get an element.
Color = cMyArray[FEnum];
Is there a way this can be accomplished in C#?
Kind regards
Alexander