[RESOLVED] The type System.Drawing.Color cannot be declared const
Hello All,
is there any way to declare const to Color?
Code:
public const Color ID_COLOR_INCOMING = Color.PaleGreen;
public const Color ID_COLOR_ANSWERED = Color.Lime;
public const Color ID_COLOR_OUTGOING= Color.Blue;
the above codes give me warnings:
The type System.Drawing.Color cannot be declared const
please advise
Thanks & Regards
Winan
Re: The type System.Drawing.Color cannot be declared const
you could use static readonly instead.
Code:
public static readonly Color ID_COLOR_INCOMING = Color.PaleGreen;
public static readonly Color ID_COLOR_ANSWERED = Color.Lime;
public static readonly Color ID_COLOR_OUTGOING = Color.Blue;
Re: The type System.Drawing.Color cannot be declared const