How to loop datatable using LINQ?

I want to loop the Datatable values using LINQ.

Same like as we normally do using ‘For Each Row’ activity.

How to loop the datatable using LINQ ?

1 Like

Hi @Muralikrishna_Surve ,
Please go through the below youtube video:

You will get a clear understanding.

Thanks & Regards,
Shubham Dutta

1 Like

LINQ doesn’t really work that way. Why not just use For Each Row? It’s what it’s meant to do.

1 Like

Hi @Muralikrishna_Surve , if you have no more queries please mark the solution and close the thread.

Thanks & Regards,
Shubham Dutta

1 Like

Hi @Muralikrishna_Surve

I agree with @postwick .
Is there any specific reason for wanting to use LINQ?

It entirely depends on the requirement, but if you want to explore solutions using code, then take the Invoke Code Activity out for a test run:

image

For Each row As DataRow In dt.AsEnumerable()
Console.WriteLine(row(0))
Next row

invoke_Code_Example.xaml (7.3 KB)

Kind Regards,
Ashwin A.K
g

2 Likes

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