I have to join 2 different datatable like with linq:
// let use Linq
var DateMarket = from p in IndexPrice.AsEnumerable()
join q in TickerPrice.AsEnumerable() on p.Field<DateTime>("DATE") equals q.Field<DateTime>("DATE") into UP
from q in UP.DefaultIfEmpty()
where p.Field<DateTime>("DATE") != null && !q.IsNull("CHG_PCT_1D")
select TestRecap.Rows.Add(p.Field<DateTime>("DATE"), q.Field<Double>("CHG_PCT_1D")) ;
however even if I use the condition :
where p.Field<DateTime>("DATE") != null && !q.IsNull("CHG_PCT_1D")
I still have a NullReferenceException at this line. Do you have an idea why ?
Thanks