C# 4: how to in-line detect for nulls?
Posted
by Dr. Zim
on Stack Overflow
See other posts from Stack Overflow
or by Dr. Zim
Published on 2010-06-07T21:25:00Z
Indexed on
2010/06/07
21:32 UTC
Read the original article
Hit count: 176
In C# 4, wasn't there a short cut for checking for null values like so:
if( myobject?.myproperty?.myotherproperty?.value != null )
The value would return null and not throw an exception.
Anyone have a link to how to use it or at least the syntax?
© Stack Overflow or respective owner