Senator Guerra Souty original series calendar,replica hublot blue steel peach pointer collocation of rolex replica Rome digital scale, track type minute replica watches scale shows that the classical model is swiss replica watches incomparable, wearing elegant dress highlights.
mr-ponna.com

 

YOU ARE HERE: HOME Questions How to use Nullable Types in NET



Nullable Types in .NET?

View(s): 15194

How to use Nullable Types in .NET?

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
}

  Asked in:  ProKarma   Expertise Level:  Intermediate
  Last updated on Thursday, 07 February 2013
3/5 stars (10 vote(s))

Register Login Ask Us Write to Us Help