Enumerable.Prepend(IEnumerable<TSource>, TSource) Enumerable.Prepend(IEnumerable<TSource>, TSource) Enumerable.Prepend(IEnumerable<TSource>, TSource) Enumerable.Prepend(IEnumerable<TSource>, TSource) Method

Definition

Adds a value to the beginning of the sequence.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<TSource> ^ Prepend(System::Collections::Generic::IEnumerable<TSource> ^ source, TSource element);
public static System.Collections.Generic.IEnumerable<TSource> Prepend<TSource> (this System.Collections.Generic.IEnumerable<TSource> source, TSource element);
static member Prepend : seq<'Source> * 'Source -> seq<'Source>
<Extension()>
Public Function Prepend(Of TSource) (source As IEnumerable(Of TSource), element As TSource) As IEnumerable(Of TSource)
Type Parameters
TSource

The type of the elements of source.

Parameters
source
IEnumerable<TSource>

A sequence of values.

element

The value to prepend to source.

Returns
IEnumerable<TSource>

A new sequence that begins with element.

Exceptions

Applies to