What is the difference between the AddRange and Concat functions on a generic List? Is one recommended over the other?
They have totally different semantics.
AddRange modifies the list by adding the other items to it.
Concat returns a new sequence containing the list and the other items, without modifying the list.
Choose whichever one has the semantics you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With