Enumerable.SkipLast<TSource>(IEnumerable<TSource>, Int32) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ソース コレクションの最後のsource要素を省略したcountの要素を含む新しい列挙可能なコレクションを返します。
public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<TSource> ^ SkipLast(System::Collections::Generic::IEnumerable<TSource> ^ source, int count);
public static System.Collections.Generic.IEnumerable<TSource> SkipLast<TSource>(this System.Collections.Generic.IEnumerable<TSource> source, int count);
static member SkipLast : seq<'Source> * int -> seq<'Source>
<Extension()>
Public Function SkipLast(Of TSource) (source As IEnumerable(Of TSource), count As Integer) As IEnumerable(Of TSource)
型パラメーター
- TSource
列挙可能なコレクション内の要素の型。
パラメーター
- source
- IEnumerable<TSource>
列挙可能なコレクション インスタンス。
- count
- Int32
コレクションの末尾から省略する要素の数。
返品
コレクションの末尾から要素を引いたcount要素source含む新しい列挙可能なコレクション。
例外
source は nullです。
注釈
countが正の数でない場合、このメソッドはsource列挙可能なコレクションの同じコピーを返します。