c# check for null with question mark code example
Example: c# question mark
FileInfo fi = ...; // fi could be null
long? length = fi?.Length; // If fi is null, length will be null
FileInfo fi = ...; // fi could be null
long? length = fi?.Length; // If fi is null, length will be null