How to count the specific in List?

Hi, Team,

I want to count the word “Delivered” how many time it is present in my list.

not using the loop.

Thank you in advance

Hi @Sanket_Shinde1

Can you try below

List.Where(Function(item) item.Contains("Delivered")).Count()


1 Like

Hey @Sanket_Shinde1
you can try:
deliveredCount As Integer = myList.Count(Function(item) item.Equals("Delivered"))

1 Like

Thank You So Much pikorpa !!!


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