Answer 1)
In .Net Framework 2.0, value types can be extended to take either their normal
values or a null value. Such an extension is called a nullable type.
Nullable type is constructed from the generic Nullable structure. By having this
feature, you can submit null values to you database table field normally, like submitting
a null DateTime value to a datetime field in your database table.
int? id = null;
if (id.HasValue)
// if id is not null
{
//...do something
}
else // if id is null
{
//... do something
}
|