LINQ query Option strict on disallows conversions from String to Boolean

Hello,

I took a LINQ query from here to replace the value of the whole column without using the For Each.

I am getting an error that says Option strict on disallows conversions from String to Boolean which I understand comes from the Where clause, but I do not know LINQ enough to resolve it. Please can somebody help with the correct LINQ query to do this?

Thank you for your help.
byuli

1 Like

@byuli
the result of the lambda function within a Where method hast to be true or false (Boolean)
the LINQ is failing on that, as replace is returning a string and not a boolean

Hi @byuli,

You may try the same approach.

Thanks :slight_smile:

Thank you, so the LINQ expression is incorrect originally?

Yes, is incorrect. Also using LINQ within an assign updating selective 1 col will fail.

  • work with a for each row activity
    Or
  • construct the entire new corrected datatable with LINQ