I have 2 data-tables which i need to compare and get the result in different table.Almost i am comparing 1000 records and it takes 2 minutes for doing comparison and get the result.I am using for loop.
Is there any other way i can optimize the for loop and reduce the processing time.
Ex : for (int i = 0; i < dt1.Rows.Count; i++)
{
for (int j = 0; j < _dt2.Count; j++)
{
//Process
}
}
Loading

Javeed M ShaikhRank #839 · 2.7K reputationPosted Apr 24, 2013, 7:53 AM EDT
Nishanthan Ganeshan16 reputationPosted Apr 24, 2013, 7:59 AM EDT
Javeed M ShaikhRank #839 · 2.7K reputationPosted Apr 24, 2013, 8:23 AM EDT
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/23703a85-20c7-4759-806a-fabf4e9f5be6
Nishanthan Ganeshan16 reputationPosted Apr 24, 2013, 9:58 AM EDT
Javeed M ShaikhRank #839 · 2.7K reputationPosted Apr 24, 2013, 10:11 AM EDT
Nishanthan Ganeshan16 reputationPosted Apr 24, 2013, 11:43 AM EDT
Javeed M ShaikhRank #839 · 2.7K reputationPosted Apr 24, 2013, 11:46 AM EDT
Nishanthan Ganeshan16 reputationPosted Apr 24, 2013, 12:00 PM EDT
Nishanthan Ganeshan16 reputationPosted May 1, 2013, 7:55 AM EDT
Javeed M ShaikhRank #839 · 2.7K reputationPosted May 1, 2013, 8:31 AM EDT
Khargesh RajputRank #616 · 3.9K reputationPosted Feb 9, 2015, 10:32 PM EST