Null coalescing operator chaining
You can chain the '??' operator so that you can do a bunch of null comparisons.
string result = value1 ?? value2 ?? value3 ?? String.Empty;
Written by Carlos Nasillo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Tricks
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#