JPDev@programming.dev to Programmer Humor@programming.dev · 9 个月前ifn'tprogramming.devimagemessage-square128fedilinkarrow-up1768arrow-down111
arrow-up1757arrow-down1imageifn'tprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 9 个月前message-square128fedilink
minus-squareCaveman@lemmy.worldlinkfedilinkarrow-up2·9 个月前Yeah, I just said it since you used it with null. I used it a lot for enums
minus-squareLmaydev@programming.devlinkfedilinkarrow-up1·edit-29 个月前The type matching is the most common thing I use it with. Combined with inline variables. if (x is string { Length: 5} s) { // do stuff with s } And switch expressions. As a side note inline variables are amazing haha
Yeah, I just said it since you used it with null. I used it a lot for enums
The type matching is the most common thing I use it with. Combined with inline variables.
And switch expressions.
As a side note inline variables are amazing haha