Is there a better way to parse SqlDecimal from SqlDataReader to double than this?
class test {
public double? Qte { get; set; }
}
SqlDataReader reader = cmd.executeReader();
reader.Read();
test t = new test() {
Qte = (reader["DL_Qte"] == DBNull.Value) ? (double?)null : double.Parse(reader["DL_Qte"].ToString())
}