Top "Enums" questions

A data type consisting of a set of named values called elements, members or enumerators of the type.

How to use enum values in f:selectItem(s)

I want to make a selectOneMenu dropdown so I can select a status on my question. Is it possible to …

jsf jsf-2 enums selectonemenu
How to Create and Use Enum in Mongoose

I am trying to create and use an enum type in Mongoose. I checked it out, but I'm not getting …

node.js mongodb mongoose enums mongoose-schema
How do I have an enum bound combobox with custom string formatting for enum values?

In the post Enum ToString, a method is described to use the custom attribute DescriptionAttribute like this: Enum HowNice { [Description("…

c# combobox enums
How to Compare Flags in C#?

I have a flag enum below. [Flags] public enum FlagTest { None = 0x0, Flag1 = 0x1, Flag2 = 0x2, Flag3 = 0x4 } I cannot …

c# .net enums attributes flags
namespaces for enum types - best practices

Often, one needs several enumerated types together. Sometimes, one has a name clash. Two solutions to this come to mind: …

c++ enums scope nested
Convert string to Enum in Python

I wonder what's the correct way of converting (deserializing) a string to a Python's Enum class. Seems like getattr(YourEnumType, …

python string serialization enums type-conversion
Static enum vs. Non-static enum

What's the difference between static and non-static enum in Java? Both usages are same. Is it correct that all static …

java enums static-members
C# numeric enum value as string

I have the following enum: public enum Urgency { VeryHigh = 1, High = 2, Routine = 4 } I can fetch an enum "value" as string like …

c# enums return-value return-type
Swift. UILabel text alignment

I create my UILabel in swift: let label = UILabel(frame: CGRect( x: 50, y: 50, width: 100, height: 50)) setting properties seems to be …

enums uilabel swift
Are C++ enums signed or unsigned?

Are C++ enums signed or unsigned? And by extension is it safe to validate an input by checking that it …

c++ enums