Qus:    How can I select count() in a LINQ expression?
Feb 19, 2021 18:55 DotNet 1 Answers Views: 1300 FRAUSKY
Prev Next
Answers (1)
PARTH Feb 20, 2021 09:10
Answer:   Please refer to below example -

IEnumerable items = new List { 8, 3, 2 };
int count = (from x in items where x < 5 select x).Count();

Post Your Answer
Guest User

Not sure what solution is right for you?

Choose the right one for you.
Get the help of the experts and find a solution that best suits your needs.


Let`s Connect