I see many third-party codes and I often see the use of the question mark in the variable type.
Example:
public bool? Status
Can anyone explain to me the difference between not having this ?
sign in the bool data type.
I see many third-party codes and I often see the use of the question mark in the variable type.
Example:
public bool? Status
Can anyone explain to me the difference between not having this ?
sign in the bool data type.
This is syntactic sugar for nullables (nullable types). Equivalent to:
public Nullable<bool> Status
It's a way for you to have a variable that can contain a null reference or a value. Types by value (integer, boolean, dates, etc.) by default can not contain null references.
More information in the manual .