2

i m a part of an ERP solution team and want to measure the performance in terms of development. By a simple process a DataTable is populated from database with 10000 odd records and on other hand a List object is filled with the same records.

my question is, which one is the lightweight and performance measurable object and why.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
umesh
  • 21
  • 1

1 Answers1

1

The answer to this question says that a List<MyObject> can be cheaper than a DataTable when primitive/value (unboxed) data types are used:

The answer to this question says that creating a List<MyObject> is even cheaper if you know the count when you create the List.

i.e. List<MyObject> myObjects = new List<MyObject>(10);

Community
  • 1
  • 1
JohnB
  • 18,046
  • 16
  • 98
  • 110