Datatable find performance

  • Thread starter Thread starter Alvin Bruney
  • Start date Start date
A

Alvin Bruney

Anybody know for sure if the data table find is faster than building a loop
routine. I'm thinking the find is syntactic sugar because it can't really
build an index table can it? But then again what is the primary key for if
it doesn't really build a table. I suspect it is more for filling the
datakeys and isn't really related to the index. But then again...
 
If you grab a copy of .NET Reflector, you can actually take a look at the
decompiled source of the Framework Class Library. The FindRow(...) method
does, indeed. work with indexes, and it's not a mere loop iteration. It also
leads to shorter, more readable code.
 
Thanks. I know it leads to shorter code, I just didn't know that it was more
than syntactic sugar. Thanks for heads up. Gotta start rewriting code now...
 
Back
Top