Enum question
-
Hello, I am studing and trying to understand just when and where to use the Enum in the format below. can someone please let me know how they use this and where and when to implement this? thanks,,, erik Dim s As String For Each s In [Enum].GetNames(GetType(Colors)) Console.WriteLine(s) Next s
-
Hello, I am studing and trying to understand just when and where to use the Enum in the format below. can someone please let me know how they use this and where and when to implement this? thanks,,, erik Dim s As String For Each s In [Enum].GetNames(GetType(Colors)) Console.WriteLine(s) Next s
[Enum].GetNames()
is a static (shared in VB.NET) function that returns an array names for the constants defined in a Type. In your case, this will return an array of names for constant values define in the Colors class. Enum.GetNames Method[^] RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome