DataTable Question

Hi,

I have the below LINQ code:

DailyBookingDT.AsEnumerable.Where(Function(d) Not(TrainBookingDT.AsEnumerable.Any(Function(t) t(“client_transaction_id”).ToString.Trim.Equals(d(“CLIENT TRANSACTION ID”).ToString.Trim)))).Count > 0

I want to modify the query instead of giving the cloumn names I want to give the column index location.

@shrayud

Just pass the index(not in a double quote) instead of columns in your query…
Example
DailyBookingDT.AsEnumerable.Where(Function(d) Not(TrainBookingDT.AsEnumerable.Any(Function(t) t(ColumnIndex).ToString.Trim.Equals(d(ColumnIndex).ToString.Trim)))).Count > 0

Its showing compile error

Expression is not an array or a method, and cannot have an argument list.

Can you share screenshot?

Should not be issue in any condition expression

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.