The days of the week, and their corresponding values in the Days Enum
Public Class EnumTest
Enum Days
Saturday
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
End Enum
Public Shared Sub Main()
Dim weekdays As Type = GetType(Days)
Dim s As String
For Each s In [Enum].GetNames(weekdays)
Console.WriteLine("{0,-11} = {1}", s, [Enum].Format(weekdays, [Enum].Parse(weekdays, s), "d"))
Next s
End Sub
End Class
Related examples in the same category