Showing posts with label Nullable c#. Show all posts
Showing posts with label Nullable c#. Show all posts

Monday, August 18, 2008

Nullable handles Selected Value

I've found a nice use for the Nullable type:

int? iSelectedYear = (int?)cboYear.SelectedValue;

if(iSelectedYear.HasValue)
{
LoadReportByYear(iSelectedYear);
}