BacksertExtension.Backsert<T> Method
Inserts the elements of a sequence into another sequence at a
specified index from the tail of the sequence, where zero always
represents the last position, one represents the second-last
element, two represents the third-last element and so on.
Namespace: MoreLinq.ExtensionsAssembly: MoreLinq (in MoreLinq.dll) Version: 4.1.0+0e154ef592f33ce0f6f3d534a9eedee273f0ce72
public static IEnumerable<T> Backsert<T>(
this IEnumerable<T> first,
IEnumerable<T> second,
int index
)
<ExtensionAttribute>
Public Shared Function Backsert(Of T) (
first As IEnumerable(Of T),
second As IEnumerable(Of T),
index As Integer
) As IEnumerable(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static IEnumerable<T>^ Backsert(
IEnumerable<T>^ first,
IEnumerable<T>^ second,
int index
)
[<ExtensionAttribute>]
static member Backsert :
first : IEnumerable<'T> *
second : IEnumerable<'T> *
index : int -> IEnumerable<'T>
- first IEnumerable<T>
- The source sequence.
- second IEnumerable<T>
- The sequence that will be inserted.
- index Int32
-
The zero-based index from the end of first where
elements from second should be inserted.
second.
- T
-
Type of elements in all sequences.
IEnumerable<T>
A sequence that contains the elements of
first
plus the elements of
second inserted at
the given index from the end of
first.
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerable<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This method uses deferred execution and streams its results.