Queryable.Prepend<TSource>(IQueryable<TSource>, TSource) Метод
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Возвращает новую запрашиваемую последовательность, содержащую элементы из source плюс указанные element, предварительно подготовленные в начале.
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);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")]
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>
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")>]
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
Тип элементов в запрашиваемой последовательности.
Параметры
- source
- IQueryable<TSource>
Запрашиваемая последовательность.
- element
- TSource
Элемент типа TSource для предварительной подготовки source.
Возвращаемое значение
Новая запрашиваемая последовательность, содержащая элементы из source плюс указанного предустановленного element в начале.
- Атрибуты
Исключения
source равно null.