convert the code for using in vb.net

RajKumarJain

New member
Joined
Sep 5, 2007
Messages
4
Programming Experience
Beginner
foreach (string colourName in Enum.GetNames(typeof(KnownColor)))
{
comboBox1.Items.Add(colourName);
}

how can i use this code in vb.net. please help, its urgent.
 
DeveloperFusions converter give this code which look valid:
VB.NET:
For Each colourName As String In [Enum].GetNames(GetType(KnownColor)) 
    comboBox1.Items.Add(colourName) 
Next
 
Back
Top