Claire <bl****@blahhhhh.com> wrote:
The following code raises an error.
"The expression being assigned to 'CeMate.frmMain.BACKCOLOR' must be
constant"
private const Color BACKCOLOR = Color.AliceBlue;
I want to define some const colors. How do I do this please.
Just use static readonly instead. Colors can't be const, as only the
following types are valid for constant expressions:
sbyte, byte, short, ushort, int, uint, long, ulong, char, float,
double, decimal, bool, string, any enumeration type, or the null type
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too