I would like to use LINQ query instead of foreach. But the syntax is not correct.
This works:
For Each Row in Data Table
Do:
row(“ColomnName”) = double.parse(row(“ColomnName”).ToString.Replace(“,”,“.”)).ToString
End
But not this one:
dt.AsEnumerable.Where(Function(r) double.parse(r(“ColomnName”).ToString.Replace(“,”,“.”)).ToString).CopyToDatatable()
Getting this error:
If Option Strict On is used, conversion from ‘String’ to ‘Boolean’ cannot be performed.
Any suggestions.
Thanks
ppr
(Peter)
2
the reason why the booelan is mandatory needed for the where lambda is explained here:
Options for updating a data column value are discussed here:
Thanks for your response.
I will find a solution.
system
(system)
Closed
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.