C "? "Modifier and "?? "Operator,
I.?Can be empty type Modifier
"?" To modify the null value type, add "?" After modifier, the value type can also be blank, for example:
Public int? CommandTimeout {get ;};
Var prop = new PropertyInfo (); prop ?. CanWrite = true;
Public CommandDefinition (string commandText, object parameters = null, IDbTransaction transaction = null, int? CommandTimeout = null, CommandType? CommandType = null)
You need to know that when compiling, add "?" The modifier value type is converted:
// Supported value type, which can be null. This class cannot be inherited. [ComVisible (true)] public static class Nullable
II.??Null merge Operator
"?" Used to calculate the final values of the null and reference types, for example:
Templates = templates ?? New List <object> ();
In the code, if templates is not empty, it returns itself. If templates is empty, it is re-instantiated.