I am fetching data from datarow and facing issue when there is null value in a row column. How can I change the below mentioned code to read null values??
Datarow dr_Out[j] = dr1.Field<double?>("" + Convert.ToString(columnNames[j]) + "");
at this line when there is null value below error occur.
cannot set column int to be null. please use dbnull instead in datarow
after adding DBNull facing this

?? (object)DbNull.Valueto the end