Enumerated Type Vb.Net - Newbie Question

  • Thread starter Thread starter AndyDunning
  • Start date Start date
A

AndyDunning

Folks,

I have an Enum declared that lists all the Id's for a set of lookups. Is it
possible to loop through the Enum extraction the Value?

Public Enum LookupId
LookupId 1 =1
LookupId 2 = 2
LookupId3 =3
End Enum

Then something Like:-

for each element in Enum LookupId
Get First Value
Load Lookup (LookupId value)
next

Thanks

Andy
 
AndyDunning said:
I have an Enum declared that lists all the Id's for a set of lookups. Is it
possible to loop through the Enum extraction the Value?

Public Enum LookupId
LookupId 1 =1
LookupId 2 = 2
LookupId3 =3
End Enum

Then something Like:-

for each element in Enum LookupId
Get First Value
Load Lookup (LookupId value)
next

Look at Enum.GetValues.
 
Back
Top