如何在ComboBox中调用所选Enum的值?
例如,在这里,我想得到Slashed的值,即304。
Public Enum SSG08
Lichen_Dashed = 26
Dark_Water = 60
Blue_Spruce = 96
Sand_Dune = 99
Mayan_Dreams = 200
Blood_in_the_Water = 222
Tropical_Storm = 233
Acid_Fade = 253
Slashed = 304
Detour = 319
Abyss = 361
Big_Iron = 503
Necropos = 538
Ghost_Crusader = 554
End Enum
在Form1_load中,我将Enums加载到ComboBox中,如下所示:
ComboBox1.Items.AddRange([Enum].GetNames(GetType(SSG08)))
ComboBox1.SelectedValue或ComboBox1.SelectedIndex,ComboBox1.SelectedItem都不起作用。