Can anyone help me?thank you very much!
You can directly use expression for that
Add new column using add data column of integer type
Then use assign
Dt.Columns("Gap").Expression = "[Price1] - [Price2]"
Cheers
Thank you ,sir,actually, i know this way , but if I just want use Linq , how should i do?
Try this
Dt = dt.AsEnumerable.ToList.ForEach(function(x) x("Gap") = Cint(x("Price1")) - Cint(x("Price2"))
Cheers