Linq Query to get the count of a value in particular column of datatable

Hi,

I have a datatable, in which have to get the count of a value available in particular column.
Kindly suggest a Linq Query to this scenario.

Thanks in advance

1 Like

Hi,

Can you share specific sample and condition?

Regards,

Hi,

Thank you for your response

image
Consider that i need to get the count of invoice number INV002 in this Data table.

Hi,

Can you try the following expression?

dt.AsEnumerable.Count(Function(r) r("Invoice Number").ToString="INV002")

Regards,

1 Like

Hi @Yoichi

Thank you

1 Like

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