> Einerseits gibt es ja die Klasse Color. Nun m�chte ich gerne �ber eine
> foreach-Schleife alle Farbnamen die mir �ber Color im Intellisense
> angezeigt werden in ein DropDownList-Element �bertragen.
Hi
F�r sowas gibts Reflection:
private ArrayList GetColors()
{
Type t = typeof(Color);
ArrayList colorsX = new ArrayList();
System.Reflection.PropertyInfo[] colorPIs = t.GetProperties();
for(int i = 0; i < colorPIs.Length; i++)
if(colorPIs[i].GetGetMethod().ReturnType == typeof(Color))
colorsX.Add(colorPIs[i].Name);
return colorsX;
}
_______________________________________________
Asp.net Mailingliste, Postings senden an:
[EMAIL PROTECTED]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net