B Bob Oct 7, 2003 #1 If I've identified a type as enum, is there a way to accees its contents (names, etc) without instantiation? Bob
If I've identified a type as enum, is there a way to accees its contents (names, etc) without instantiation? Bob
H Herfried K. Wagner [MVP] Oct 7, 2003 #2 Bob said: If I've identified a type as enum, is there a way to accees its contents (names, etc) without instantiation? Click to expand... \\\ Dim s As String For Each s In [Enum].GetNames(GetType(KnownColor)) Me.ListBox1.Items.Add(s) Next s /// Replace 'KnownColor' with the name of your enum.
Bob said: If I've identified a type as enum, is there a way to accees its contents (names, etc) without instantiation? Click to expand... \\\ Dim s As String For Each s In [Enum].GetNames(GetType(KnownColor)) Me.ListBox1.Items.Add(s) Next s /// Replace 'KnownColor' with the name of your enum.
B Bob Oct 7, 2003 #3 Never mind, I got it. Duh...GetNames is static. I just had to bracket it. [Enum].GetNames(t) Bob