DEV Community

Discussion on: Using Enums as Properties

Collapse
 
saint4eva profile image
saint4eva

Nice post. You can even be more succinct with the switch

task.Status switch
{
Status.NotStarted => //Do something,
Status.InProgress => //Do something else,
Status.Completed => //Yay.....

}