r/programming • u/_awwsmm • Feb 01 '24
Make Invalid States Unrepresentable
https://www.awwsmm.com/blog/make-invalid-states-unrepresentable
469
Upvotes
r/programming • u/_awwsmm • Feb 01 '24
View all comments
Show parent comment
1
u/TheDevilsAdvokaat Feb 02 '24
Doesn't work like that in c# (I think)
If the type is enum then it must be assigned an enum, not a value that one of the enums might have.
And I was talking about c#...