How can I assign a DBNull in a better way?
- by Mike
Hi,
I need to parse value from a datarow and assign it to another datarow.If the input is valid, then I need to parse it to double or else add a dbnull value to the output.I'm doing the following, is there a better way to do it?
public double? GetVolume(object data)
{
string colValue = data == null ? string.Empty :…