C#C
C#3y ago
Gladiator

❔ Nullable enums or None inside

Suppose there are some known tasks like Carry, Build, etc.
A worker can be idle or busy. If they are busy, a task is assigned to them.
Which one do you prefer to define task types?
public enum TaskType{
   None = 0,
   //...
}
TaskType Type;


public enum TaskType{
   Build = 0,
   //...
}
TaskType? Type;

Imo, The second one
Was this page helpful?