What is the difference between the AddRange and Concat functions on a generic List? Is one recommended over the other?
So ion a tight loop, it would be much better to use add range so not as to lose performance due to all the internal newing and pounding the GC?
Actually, due to deferred execution, using Concat would likely be faster because it avoids object allocation - Concat doesn't copy anything, it just creates links between the lists so when enumerating and you reach the end of one it transparently takes you to the start of the next!
+1, Indeed, if you forget to 'tolist', concat silently does nothing