Top "Enums" questions

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

Get Enum from Description attribute

Possible Duplicate: Finding an enum value by its Description Attribute I have a generic extension method which gets the Description …

c# .net attributes enums
C# how to use enum with switch

I can't figure out how to use switches in combination with an enum. Could you please tell me what I'm …

c# enums switch-statement switch-expression
enum to string in modern C++11 / C++14 / C++17 and future C++20

Contrary to all other similar questions, this question is about using the new C++ features. 2008 c Is there a simple …

c++ string enums c++17 c++20
Forward declaring an enum in C++

I'm trying to do something like the following: enum E; void Foo(E e); enum E {A, B, C}; which …

c++ enums
What is the size of an enum in C?

I'm creating a set of enum values, but I need each enum value to be 64 bits wide. If I recall …

c enums
Why do you use typedef when declaring an enum in C++?

I haven't written any C++ in years and now I'm trying to get back into it. I then ran across …

c++ enums typedef
Choosing the default value of an Enum type without having to change values

In C#, is it possible to decorate an Enum type with an attribute or do something else to specify what …

c# .net enums
Binding an enum to a WinForms combo box, and then setting it

a lot of people have answered the question of how to bind an enum to a combo box in WinForms. …

c# .net winforms combobox enums
How to implement Enums in Ruby?

What's the best way to implement the enum idiom in Ruby? I'm looking for something which I can use (almost) …

ruby enums
Java enum - why use toString instead of name

If you look in the enum api at the method name() it says that: Returns the name of this enum …

java enums