Skip to content

Joining two lists together

If you have two lists of the same type, you may want to join them together. There are to way to do this.

The first way would be to use the List.AddRange() method. This will modify the original array, so if you want to keep the original arrays, you may want to go with the second option.

The second way uses the List.Concat() method to create a new list on merging:

[sc name=”src” url=”https://stackoverflow.com/questions/1528171/joining-two-lists-together” ]

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.