Hai,
If you want to get all the color names, then you would want to get all
of the static properties on the color structure. You can use reflection to
do this:
// Get the property info instances for all static properties on the Color
structure.
PropertyInfo[] pobjInfos =
typeof(Color).GetProperties(BindingFlags.GetProper ty | BindingFlags.Public |
BindingFlags.Static);
Then, you can cycle through the property infos and get the names of the
properties.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
ni**************@exisconsulting.com
" #Hai" <Re**********@Mail.com> wrote in message
news:eg**************@TK2MSFTNGP10.phx.gbl...
Hi,
We have a long list of color name: Color.Red, Color.Green, Color.Green....
If I want to get the list of all color name (certainly by programming),
how to that ?
Thanks