Returns a sequence consisting of the head elements and the given tail element.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static IEnumerable<T> Concat<T>( this IEnumerable<T> head, T tail )
<ExtensionAttribute> _ Public Shared Function Concat(Of T) ( _ head As IEnumerable(Of T), _ tail As T _ ) As IEnumerable(Of T)
public: [ExtensionAttribute] generic<typename T> static IEnumerable<T>^ Concat( IEnumerable<T>^ head, T tail )
Generic Template Parameters
- T
- Type of sequence
Parameters
- head (IEnumerable<(Of <(<'T>)>)>)
- All elements of the head. Must not be null.
- tail (T)
- Tail element of the new sequence.
Return Value
A sequence consisting of the head elements and the given tail element.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<(Of <(<'T>)>)>. When you use instance method syntax to call this method, omit the first parameter.
Remarks
This operator uses deferred execution and streams its results.
Assembly: MoreLinq (Module: MoreLinq.dll) Version: 1.0.16006.0 (1.0.16006.1845)