Add Enum to Arraylist

M

Milosz Weckowski

I want to add alle Enum Meners to an arraylist:

class Progbar
......
Public Enum DrawingStyles
Solid
Rectangle
Elipse
InvElipse
End Enum
end class

Class Another Class
.....
sub addEnum
Me.cmbDrawStyle.Items.Add(Me.prgbar.DrawingStyles.Solid)
Me.cmbDrawStyle.Items.Add(Me.prgbar.DrawingStyles.Rectangle)
Me.cmbDrawStyle.Items.Add(Me.prgbar.DrawingStyles.Elipse)
Me.cmbDrawStyle.Items.Add(Me.prgbar.DrawingStyles.InvElipse)
end sub
end class

Is there any possibility to do it dynamically ?
In the full Framework there ist the getnames function from the Enum Class,
Dim ColorList As New ArrayList()
ColorList.AddRange([Enum].GetNames(GetType(KnownColor)))

but how to do this in the CF ?

greetings

Milosz Weckowski
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top