Rahul  Pandey
What is the difference between Count() and LongCount extension methods in LINQ?
By Rahul Pandey in LINQ on May 12 2013
  • Bhabani Prasad
    May, 2014 21

    1-LongCount() has a greater range than Count(). long.MinValue = -9223372036854775808 long.MaxValue = 9223372036854775807 DotNet Framework type is System.Int64 2-While count() DotNet Framework type is System.Int32 long.MinValue = -2,147,483,648 long.MaxValue = 2,147,483,647 3-So, if you want to count something which is quite big then use LongCount() extension method otherwise use Count()

    • 1
  • Dharmendra Singh
    Jun, 2013 10

    as name suggests count is used for int32 but longcount is used for int64.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS