What is the difference between Count() and LongCount extension methods in LINQ?
Answer Posted / Deepak Nigam
Both Count() and LongCount are extension methods that return the number of elements in a sequence, but they differ in the type of result. Count() returns an Int32, while LongCount returns a Long (Int64). This makes Count() suitable for sequences that can fit within an integer, and LongCount suitable for larger sequences.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category