sdr is my sqldatareader and I want to check that the curPrice value which is of type decimal is null.
inrec.curPrice = sdr.IsDBNull(7) ? (decimal?)null : sdr.
either convert curPrice to nullable, or use .Value property of nullable types.
curPrice
If curPrice is a property of a class then
public decimal? curPrice { get; set; }