Given the method:
public static bool IsDateValid(DateTime? date)
{
if (date.HasValue ? date.GetValueOrDefault() < MinDate : false)
{
return false;
}
return date.GetValueOrDefault() < MaxDate;
}
Is it possible to rewrite the if statement such that it uses the null-coalescing operator?