Point 1:
I’m trying to find a certain value in a scraped data table. If the data table contains this value certain actions need to be done. But for some reason it doesn’t work.
In the annotation you can see the one that does work, but if I removed the year, which can vary, it doesn’t work anymore.
If I understand correctly: Contains is a .net code and doesn’t need a * (tested with wildcard * but doesn’t work either).
Point 2:
In the expression below the wildcard does not work either, how can I fix this one as well?
ExtractDataTable.Select(“[Column1]=‘Werknemers (2014)’”).ElementAt(0)(“Column2”).ToString
Point 1:
The first one seems to work flawlessly, can you explain this part so I can understand for future reference: .Any(function(x) x.ToString.Contains
Point2: I get an error regarding .AsEnumerable not being a member of system.data table.
can you explain this part so I can understand for future reference: .Any(function(x) x.ToString.Contains
Any method is in LINQ, and function(x) x… is expression of anonymous function in vb.net.
This Any method return true if one or more expression for each item of collection returns true. In this case, each item of rowT.ItemArray will be assigned to x, then evaluated as x.ToString.Contains(“Werknemers”) one by one.