perfomance question

M

majorone

hello, i am trying to design a method in manipulating data over the
intranet, and i am wondering which of the following design can get
better performance.
can u help me? thanks.


<<design 1>>
A DataTable object which contains 4 columns for each row:
id (int), columnA (string), column B (string), column C (string)


<<design 2>>
A generic List<myData> which contains a list of MyData object.

class MyData{
int id;
string columnA;
string columnB;
string columnC;
}
 
J

John Timney \(MVP\)

Having never tried it, I would guess that using a datatable directly with
your data would be faster as you wont have any object casting to do.
Perhaps you should run a small test to find out.

Regards

John Timney (MVP)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top