Queryable.Append<TSource>(IQueryable<TSource>, TSource) 方法

定義

傳回新的可查詢序列,包含來自 source 的元素,並在結尾加上指定的 elementReturns a new queryable sequence that contains the elements from source plus the specified element appended at the end.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::IQueryable<TSource> ^ Append(System::Linq::IQueryable<TSource> ^ source, TSource element);
public static System.Linq.IQueryable<TSource> Append<TSource> (this System.Linq.IQueryable<TSource> source, TSource element);
static member Append : System.Linq.IQueryable<'Source> * 'Source -> System.Linq.IQueryable<'Source>
<Extension()>
Public Function Append(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

要在 source 後面加上的 TSource 類型元素。An element of type TSource to append to source.

傳回

IQueryable<TSource>

新的可查詢序列,包含來自 source 的元素,並在結尾加上指定的 elementA new queryable sequence that contains the elements from source plus the specified element appended at the end.

例外狀況

sourcenullsource is null.

適用於