Yes you are right. I was running an example program from the book 'Visual
C#.NET core reference' by Mickey Williams. The example used an up/down
control to cylcle through the KnownColor enumeration, setting the form's
background colour to each of the members. However, upon reaching the
'Transparent' member an exception was generated, as this is not a valid
background colour. I mistakenly assumed that the enumeration would be in the
same order as that specified in the MSDN library. As you pointed out, it is
not.
Thank you.
"Mattias Sjögren" wrote:
colorNames does not contain the full list of member names detailed in the
System.Drawing.KnownColor enumeration, but just a subset. Why is this?
It does here. Which ones are missing? It's not the fact that the list
of names ins't sorted that's confusing you, is it?
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.