What is the difference between Count() and LongCount extension methods in LINQ?
Answer / 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 |
What are conversion operators?
In which statement the LINQ query is executed?
Which namespace is necessary to use LINQ?
What is linqkit?
What is the advantage of linq over sql?
What is “oftype"? In linq?
What is linq in .net with example?
What are the different ways to write linq query syntax?
What is linq used for?
What is LINQPad?
What is lambda expression in linq?
what is the role of DataContext classes in LINQ?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)