CreatedDate = meta.CreatedDate.HasValue ? meta.CreatedDate.Value.ToShortDateString : null
This line of code throws exception 'Type of conditional expression cannot be determined because there is no implicit conversion between method group and null.'
Is there any working way to make this check and and/or any more elegant (less ugly) way?
Note:
myObject = (dynamic)new
{
CreatedDate = meta.CreatedDate.HasValue ? meta.CreatedDate.Value.ToShortDateString : null
}