So I have created a System.Nullable
And a typed DataRow from my DataTable:
MyDataSet.FactRow factRow = factTable.Rows;
Why does this NOT WORK:
emailDate = factRow.IsEmailDateNull() ? null : factRow.EmailDate;
But this works:
emailDate = null;
emailDate = factRow.EmailDate;
Compiler error is: Type of conditional expression cannot be determined because there is no implicit conversion between '
David defined this problem as a feature. But aren't both examples the same? Isn't this just a compile thing to convert from the first example to the second one?
I think it has to do something with nullable types, because with string or byte it works like a charm:
byte picture = factRow.IsPictureNull() ? null : factRow.Picutre;