Top "Enumeration" questions

The process of enumerating values, for example from some collection.

How do I convert an integer to an enumerated type?

I know how to convert an enumerated type to an integer. type TMyType = (mtFirst, mtSecond, mtThird); var ordValue:integer; enumValue:…

delphi casting integer enumeration
Why aren't Enumerations Iterable?

In Java 5 and above you have the foreach loop, which works magically on anything that implements Iterable: for (Object o : …

java enumeration iterable
C - forward declaration of enums?

Forward declaration of enums in C does not work for me. I searched the internet and stackoverflow but all of …

c enums enumeration forward-declaration
How to convert an enum value to a string?

I know I have been able to do this before, long ago, so it must be possible. I'd like to …

string delphi enumeration
Can Swift enums have multiple raw values?

I want to associate two raw values to an enum instance (imagine an enum representing error types, I want Error.…

swift enums enumeration
C++ - enum vs. const vs. #define

At the end of the article here: http://www.learncpp.com/cpp-tutorial/45-enumerated-types/, it mentions the following: Finally, as with …

c++ macros constants enumeration
How to count the number of lines in an Objective-C string (NSString)?

I want to count the lines in an NSString in Objective-C. NSInteger lineNum = 0; NSString *string = @"abcde\nfghijk\nlmnopq\nrstu"; NSInteger …

objective-c cocoa newline enumeration
Is there a way to iterate through all enum values?

Possible Duplicate: C#: How to enumerate an enum? The subject says all. I want to use that to add the …

c# enumeration
Cast Enumeration Value to Integer in Delphi

Is it possible to cast/convert an Enumeration Value to Integer in Delphi? If yes, then how?

integer pascal enumeration delphi
WPF How to bind an enum with Description to a ComboBox

How can I bind an enum with Description (DescriptionAttribute) to a ComboBox? I got an enum: public enum ReportTemplate { [Description("…

c# wpf combobox devexpress enumeration