I have some code: partial void FuncName(TimeSpan? value)
What does having the nullable operator there allow me to do? If it wasn't there could I not pass a null TimeSpan at all? Do I need it for every argument I pass that could be null?
Thanks
I have some code: partial void FuncName(TimeSpan? value)
What does having the nullable operator there allow me to do? If it wasn't there could I not pass a null TimeSpan at all? Do I need it for every argument I pass that could be null?
Thanks
The ? is for nullable, it will allow you to pass null in the TimeSpan.
Nullable types are instances of the System.Nullable struct. A nullable type can represent the correct range of values for its underlying value type, plus an additional null value. For example, a Nullable, pronounced "Nullable of Int32," can be assigned any value from -2147483648 to 2147483647, or it can be assigned the null value.
The sign ?
with DataType indicates that Datatype is nullable.
You can read more about Nullable types here