Re:C# Pattern Matching
by pbz on Tuesday February 04, 2020 @10:11PM
(#22243669)
The new "something is not null" check in C#8 is "something is object/set"; for example: if (x is {})
[ Parent
| on HN ]
Thanks. Just learned that object/tuple deconstruction works with is keyword as well (I mean makes sense). That makes argument checking so much less burden.
That also explains the switch in parameter checking from == null to is null for the default code analyzers/refactors/code hints.