Imports System
Class Program
Enum EN
A = 0
B = 1
C = 2
End Enum
Public Shared Sub Main()
' Checks if the name of EN.C is "C".
Console.WriteLine([Enum].GetName(GetType(EN), EN.C) = "C")
' Converts EN.C to string and compares it to "C".
Console.WriteLine(EN.C.ToString() = "C")
' Parses the string "C" into the enum and checks if it equals EN.C.
Console.WriteLine(CType([Enum].Parse(GetType(EN), "C"), EN) = EN.C)
End Sub
End Class
' run:
'
' True
' True
' True
'