Top "Enums" questions

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

Convert from enum ordinal to enum type

I've the enum type ReportTypeEnum that get passed between methods in all my classes but I then need to pass …

java enums
How to use enums as flags in C++?

Treating enums as flags works nicely in C# via the [Flags] attribute, but what's the best way to do this …

c++ enums
Pick a random value from an enum?

If I have an enum like this: public enum Letter { A, B, C, //... } What is the best way to pick …

java random enums
Java Enum Methods - return opposite direction enum

I would like to declare an enum Direction, that has a method that returns the opposite direction (the following is …

java enums enumeration
Enum Naming Convention - Plural

I'm asking this question despite having read similar but not exactly what I want at C# naming convention for enum …

c# .net enums naming-conventions plural
Working with Enums in android

I am almost done with a calculation activity I am working with in android for my app. I try to …

android enums
Override valueof() and toString() in Java enum

The values in my enum are words that need to have spaces in them, but enums can't have spaces in …

java enums overriding tostring value-of
What is the default value for enum variable?

An enum variable, anyone know if it is always defaulting to the first element?

c# .net enums
How to get Enum Value from index in Java?

I have an enum in Java: public enum Months { JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, …

java enums
Storing integer values as constants in Enum manner in java

I'm currently creating integer constants in the following manner. public class Constants { public static int SIGN_CREATE=0; public static int …

java enums constants