💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev to C Sharp@programming.devEnglish · 6 months agoWriting “string.IsNullOrEmpty” using pattern matching and comparing the resulting codewww.tabsoverspaces.comexternal-linkmessage-square4fedilinkarrow-up120arrow-down10cross-posted to: dotnet@programming.dev
arrow-up120arrow-down1external-linkWriting “string.IsNullOrEmpty” using pattern matching and comparing the resulting codewww.tabsoverspaces.com💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.dev to C Sharp@programming.devEnglish · 6 months agomessage-square4fedilinkcross-posted to: dotnet@programming.dev
minus-squareRogue@feddit.uklinkfedilinkarrow-up2·edit-26 months agoI’ve always used the Nullable context so typically I’m just using string.IsNullOrEmpty to determine empty strings, I’m already confident null isn’t leaking. But your explanation does make sense. I’m now wondering why I’ve never just used myStr != ""
I’ve always used the Nullable context so typically I’m just using string.IsNullOrEmpty to determine empty strings, I’m already confident null isn’t leaking. But your explanation does make sense.
I’m now wondering why I’ve never just used
myStr != ""