If I have a query that returns a DateTime
, what's the value of FirstOrDefault()
? Is there a generic way to get the default value of a C# scalar? Example:
var list = (from item in db.Items
where item.ID==1234
select item.StartDate).FirstOrDefault();
Edit: Assume that the column StartDate
can't be null.