Before Django v3.0 I used to use enum.Enum together with enum.auto (see reference) for my choices fields. The reason was mostly so I could use my enumeration cl
I want to use deeply nested enums to represent blocks in my game: enum Element { Void, Materal(Material) } enum Material { Gas(Gas), NonGas(NonGas) } enum NonGa
When using scoped enums I stumbled over some syntax which is accepted by Microsoft, but not by clang or gcc: using enum class Color { RED, GREEN, BLUE }; (ht
I've been struggling with this now longer than I should and surprisingly, the existing questions (and there are many) don't really help further. My goal is to d
Consider the following simple Flags Enum in C#: [Flags] public enum CountingEnum { Zero = 0, One = 1 << 0, Two = 1 << 1, Three = Two
Java newbie... I have a dictionary like so: electronictypeModelsMap = { "laptops" => ["macbook", "thinkpad", "yoga"], "desktops" => ["macmini", "imac", "o
I have a feedbackQuestion schema which takes (title: string, subtitle: string, types: enum, values: enum) import { Prop, Schema, SchemaFactory } from '@nestjs/m
I am new to OpenApi and want to define my api with an api.yaml (OpenApi version 3.0.1). My problem is the generated enum just contains the name and not the valu
How can I tell if a variable is of type enum? I have installed PHP 8.1 on my Ubuntu 20.04. I'm testing the new "enum" types. Is something like that possible? is
I am trying to implement this helper function in C# 7.3: public static T? ToEnum<T>(this string enumName) where T : Enum =>
I'm working on code bases with extensive type hints, checked by mypy. There's several instances where we have a mapping from an enum.Enum or other small finite
I want to assign all default values for allowed_file_types column in products table which are all values of enum FileTypes. But now I have no way to do that. Ca
In the code below, I am trying to output the value of a symbol that is an instance variable of Operation from a PLUS constant. But I can't access that variable.
I have 2 enums defined as below in 2 separate files: MyErrorCodes.java @Getter public enum MyErrorCodes implements ErrorCode { ERROR1(90, 1, 01), ERROR2
Say you have a byte value equal to its max value, so byte aByte = 255;. When you increment a value past its max value, it usually wraps around to its minimum va
I want to set enum in datatable ColumnProperty of nopcommerce 4.4. I tried things like new ColumnProperty(nameof(await(((TransmitEnumStatus)Model.StatusId).ToSe
I'm looking for a way to return an Enum type nested in a Generic class. Here's what I mean: public interface MapperClass<E, D> { D entityToDto(E enti
Are there any best practices in troubleshooting enums when using with Npgsql.EntityFrameworkCore.PostgreSQL provider? It's just that I don't know where to look
In json schema, I can simply define a code list using "enum" with a list of code that is available, for example: { "type": "object", "properties": { "gr
I have a nullable enum property on the source side and get this property with value 0 instead of NULL. But 0 is not a represented value in the enum so AutoMappe