Last updated 5 years ago
Was this helpful?
Returns a new collection that contains the elements of the first collection followed by elements of the second.
A new collection is created by join all elements of both collections.
Appending second collection to the first one
Parameters
Returns
IEnumerable<T> source1
IEnumerable<T> source2
IEnumerable<T>
//IEnumerable<int> first = { 1, 2, 3, 4, 5 } //IEnumerable<int> second = { 6, 7, 8, 9, 10 } IEnumerable<int> result = first.Append(second) //result = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }
//IEnumerable<int> first = { 6, 7, 8, 9, 10 } //IEnumerable<int> second = { 1, 2, 3, 4, 5 } IEnumerable<int> result = first.Append(second) //result = { 6, 7, 8, 9, 10, 1, 2, 3, 4, 5 }