Genius
(Fr34k=)
Named Enumerations
-
- Enthusiast
- Posts: 731
- Joined: Wed Apr 21, 2004 7:12 pm
Re: Named Enumerations
I know that this dates back over 4 years, but I think it would be a great idea.
I use named enumerations frequently in Visual Basic. They make it easier to assign only one of the
enumerated values to a variable. You can declare a variable to be of the enumeration "type" and then
the enumerated values pop up in the auto-complete suggestions (VB calls it "Intellisense").
You can even preface the enumerated value with the name of the enumeration to make it obvious
exactly what the variable type is.
There are certainly workarounds to achieve almost the same thing, but named enumerations would make it a lot easier.
I use named enumerations frequently in Visual Basic. They make it easier to assign only one of the
enumerated values to a variable. You can declare a variable to be of the enumeration "type" and then
the enumerated values pop up in the auto-complete suggestions (VB calls it "Intellisense").
You can even preface the enumerated value with the name of the enumeration to make it obvious
exactly what the variable type is.
There are certainly workarounds to achieve almost the same thing, but named enumerations would make it a lot easier.
-
- User
- Posts: 67
- Joined: Thu Jul 29, 2010 10:53 am
Re: Named Enumerations
I second this idea!