Thread: Enum in VB
View Single Post
  #2 (permalink)  
Old June 7th, 2003, 03:43 PM
JonathanC JonathanC is offline
Authorized User
 
Join Date: Jun 2003
Location: Cowes, IOW, United Kingdom.
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to JonathanC
Default

Hi

You can try this instead (notice the [YourFullNamespace] placeholder must be altered
example: "YourApplicationName.Form1+RegionEnum" should replace mine (do not add the [] brackets)

start .........

Dim myType As Type = Type.GetType("[YourFullNamespace+RegionEnum]")

For Each region In System.Enum.GetValues(myType)
 _mapRegions.Add(region, System.Enum.GetName(myType, region))
Next
........ end

Hope this helps you out.




Jonathan Crossland
http://www.jonathancrossland.com