Skip to main content
Filter by
Sorted by
Tagged with
1140 votes
43 answers
1.3m views

I'm mainly a C# developer, but I'm currently working on a project in Python. How can I represent the equivalent of an Enum in Python?
3947 votes
30 answers
2.2m views

How do I cast an int to an enum in C#?
lomaxx's user avatar
  • 116k
21 votes
2 answers
12k views

This is probably best shown with an example. I have an enum with attributes: public enum MyEnum { [CustomInfo("This is a custom attrib")] None = 0, [CustomInfo("This is another attrib")]...
Keith's user avatar
  • 157k
107 votes
13 answers
98k views

I need to validate an integer to know if is a valid enum value. What is the best way to do this in C#?
Jedi Master Spooky's user avatar
1812 votes
15 answers
726k views

From time to time I see an enum like the following: [Flags] public enum Options { None = 0, Option1 = 1, Option2 = 2, Option3 = 4, Option4 = 8 } I don't understand what ...
Brian Leahy's user avatar
  • 35.8k

1
454 455 456 457
458