{TOC}
| Namespace: | System.Linq |
| Assembly: | System.Core.dll |
| Extends: | IEnumerable<T> |
Back to
Standard Query Operator IndexEditIntroduction
The Concat operator concatenates two sequences. It returns all elements from the first sequence, then all elements from the second sequence. If you want duplicate elements returned, consider using the
Union operator instead.
EditMethod Signatures
public static IEnumerable<TSource> Concat<TSource>(
this IEnumerable<TSource> first,
IEnumerable<TSource> second)EditExceptions
Throws an ArgumentNullException if
first or
second is null.
EditPseudo-code
If
first is null, throw an ArgumentNullException.
If
second is null, throw an ArgumentNullException.
Iterate the
first sequence.
Return the current element (Resume execution from here when the next element is requested).
Iterate the
second sequence.
Return the current element (Resume execution from here when the next element is requested).
EditLoop Count
This operator implements the standard
deferred execution iterator pattern. This means, no looping will occur until the result is iterated over.
EditCode Samples
TODO:Needs code sample.