int?
-
int? is shorthand for INullable A nullable type can be null as well as the normal values and has a HasValue property. Very useful, for example, if you have a numeric column in your database which can be null, or just in general to avoid having to have magic numbers to indicate that no value has been set. Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
The question mark denotes it is a nullable value. For example,
int? i = null;
is the same as
Nullable<int> i = null;
The Nullable<T> type wraps a value type, like integers, but allows you to assign null to them. Without this, you couldn't assign null to an int or any other value type.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: 3 years of marriage The apostle Paul, modernly speaking: Epistles of Paul Judah Himango