Queryable.Prepend<TSource>(IQueryable<TSource>, TSource) Метод
Определение
Возвращает новую запрашиваемую последовательность, содержащую элементы из source
с указанным элементом element
, добавленным в начале.Returns a new queryable sequence that contains the elements from source
plus the specified element
prepended at the beginning.
public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
static System::Linq::IQueryable<TSource> ^ Prepend(System::Linq::IQueryable<TSource> ^ source, TSource element);
public static System.Linq.IQueryable<TSource> Prepend<TSource> (this System.Linq.IQueryable<TSource> source, TSource element);
static member Prepend : System.Linq.IQueryable<'Source> * 'Source -> System.Linq.IQueryable<'Source>
<Extension()>
Public Function Prepend(Of TSource) (source As IQueryable(Of TSource), element As TSource) As IQueryable(Of TSource)
Параметры типа
- TSource
Тип элементов в последовательности, для которой выполняется запрос.The type of the elements in the queryable sequence.
Параметры
- source
- IQueryable<TSource>
Запрашиваемая последовательность.A queryable sequence.
- element
- TSource
Элемент типа TSource
, который следует добавить в начало source
.An element of type TSource
to prepend to source
.
Возвращаемое значение
- IQueryable<TSource>
Новая запрашиваемая последовательность, содержащая элементы из source
с указанным элементом element
, добавленным в начале.A new queryable sequence that contains the elements from source
plus the specified element
prepended at the beginning.
Исключения
source
имеет значение null
.source
is null
.