20
Writing “string.IsNullOrEmpty” using pattern matching and comparing the resulting code
(www.tabsoverspaces.com)
A community about the C# programming language
Getting started
Useful resources
IDEs and code editors
Tools
Rules
Related communities
myStr.IsNullOrEmpty()
feels a bit weird to me, because you have to know that it's an extension method.Otherwise it kinda looks like you might be trying to run a method of something that's possibly
null
That's the same design principle of why
ArgumentNullException.ThrowIfNull(myStr)
is not an extension method