© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
10 replies
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{
   None = 0,
   //...
}
TaskType Type;


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

Imo, The second one
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Calling a nullable Action or Func
C#CC# / help
4y ago
❔ Nullable bools
C#CC# / help
3y ago
✅ Enums in C#
C#CC# / help
13mo ago