Returns a sequence consisting of the head element and the given tail elements.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static IEnumerable<T> Concat<T>( this T head, IEnumerable<T> tail )
<ExtensionAttribute> _ Public Shared Function Concat(Of T) ( _ head As T, _ tail As IEnumerable(Of T) _ ) As IEnumerable(Of T)
public: [ExtensionAttribute] generic<typename T> static IEnumerable<T>^ Concat( T head, IEnumerable<T>^ tail )
Generic Template Parameters
- T
- Type of sequence
Parameters
- head (T)
- Head element of the new sequence.
- tail (IEnumerable<(Of <(<'T>)>)>)
- All elements of the tail. Must not be null.
Return Value
A sequence consisting of the head elements and the given tail elements.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type . 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)