Enumerable クラス

Enumerable クラス (System.Linq 名前空間)

[APIドキュメント]

public static class Enumerable

継承:Object → Enumerable

  • IEnumerable<T>インターフェイスを実装するオブジェクトに対するLINQの操作を実行するための一連の静的メソッドを拡張メソッドで提供します。

メソッド

All

@ [APIドキュメント]

public static bool All<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate);

Any

@ [APIドキュメント]

public static bool Any<TSource> (this IEnumerable<TSource> source);
public static bool Any<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate);

Average

@ [APIドキュメント]

public static float Average (this IEnumerable<float> source);
public static float? Average (this IEnumerable<float?> source);
public static double? Average (this IEnumerable<long?> source);
public static double? Average (this IEnumerable<int?> source);
public static double? Average (this IEnumerable<double?> source);
public static double Average (this IEnumerable<long> source);
public static double Average (this IEnumerable<int> source);
public static double Average (this IEnumerable<double> source);
public static decimal Average (this IEnumerable<decimal> source);
public static decimal? Average (this IEnumerable<decimal?> source);
public static double? Average<TSource> (this IEnumerable<TSource> source, Func<TSource,int?> selector);
public static float Average<TSource> (this IEnumerable<TSource> source, Func<TSource,float> selector);
public static float? Average<TSource> (this IEnumerable<TSource> source, Func<TSource,float?> selector);
public static double? Average<TSource> (this IEnumerable<TSource> source, Func<TSource,long?> selector);
public static double? Average<TSource> (this IEnumerable<TSource> source, Func<TSource,double?> selector);
public static decimal? Average<TSource> (this IEnumerable<TSource> source, Func<TSource,decimal?> selector);
public static double Average<TSource> (this IEnumerable<TSource> source, Func<TSource,long> selector);
public static double Average<TSource> (this IEnumerable<TSource> source, Func<TSource,int> selector);
public static double Average<TSource> (this IEnumerable<TSource> source, Func<TSource,double> selector);
public static decimal Average<TSource> (this IEnumerable<TSource> source, Func<TSource,decimal> selector);

Contains

@ [APIドキュメント]

public static bool Contains<TSource> (this IEnumerable<TSource> source, TSource value);
public static bool Contains<TSource> (this IEnumerable<TSource> source, TSource value, IEqualityComparer<TSource>? comparer);

Count

@ [APIドキュメント]

public static int Count<TSource> (this IEnumerable<TSource> source);
public static int Count<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate);

Distinct

@ [APIドキュメント]

public static IEnumerable<TSource> Distinct<TSource> (this IEnumerable<TSource> source);
public static IEnumerable<TSource> Distinct<TSource> (this IEnumerable<TSource> source, IEqualityComparer<TSource>? comparer);

ElementAt

@ [APIドキュメント]

public static TSource ElementAt<TSource> (this IEnumerable<TSource> source, int index);

First

@ [APIドキュメント]

public static TSource First<TSource> (this IEnumerable<TSource> source);
public static TSource First<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate);

FirstOrDefault

@ [APIドキュメント]

public static TSource? FirstOrDefault<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate);
public static TSource? FirstOrDefault<TSource> (this IEnumerable<TSource> source);

Last

@ [APIドキュメント]

public static TSource Last<TSource> (this IEnumerable<TSource> source);
public static TSource Last<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate);

Max

@ [APIドキュメント]

public static float? Max (this IEnumerable<float?> source);
public static int Max (this IEnumerable<int> source);
public static long? Max (this IEnumerable<long?> source);
public static float Max (this IEnumerable<float> source);
public static int? Max (this IEnumerable<int?> source);
public static decimal Max (this IEnumerable<decimal> source);
public static decimal? Max (this IEnumerable<decimal?> source);
public static long Max (this IEnumerable<long> source);
public static double Max (this IEnumerable<double> source);
public static double? Max (this IEnumerable<double?> source);
public static TResult? Max<TSource,TResult> (this IEnumerable<TSource> source, Func<TSource,TResult> selector);
public static float Max<TSource> (this IEnumerable<TSource> source, Func<TSource,float> selector);
public static float? Max<TSource> (this IEnumerable<TSource> source, Func<TSource,float?> selector);
public static long? Max<TSource> (this IEnumerable<TSource> source, Func<TSource,long?> selector);
public static int? Max<TSource> (this IEnumerable<TSource> source, Func<TSource,int?> selector);
public static double? Max<TSource> (this IEnumerable<TSource> source, Func<TSource,double?> selector);
public static long Max<TSource> (this IEnumerable<TSource> source, Func<TSource,long> selector);
public static int Max<TSource> (this IEnumerable<TSource> source, Func<TSource,int> selector);
public static double Max<TSource> (this IEnumerable<TSource> source, Func<TSource,double> selector);
public static decimal Max<TSource> (this IEnumerable<TSource> source, Func<TSource,decimal> selector);
public static TSource? Max<TSource> (this IEnumerable<TSource> source);
public static decimal? Max<TSource> (this IEnumerable<TSource> source, Func<TSource,decimal?> selector);

Min

@ [APIドキュメント]

public static long? Min (this IEnumerable<long?> source);
public static int? Min (this IEnumerable<int?> source);
public static float Min (this IEnumerable<float> source);
public static float? Min (this IEnumerable<float?> source);
public static double? Min (this IEnumerable<double?> source);
public static double Min (this IEnumerable<double> source);
public static long Min (this IEnumerable<long> source);
public static int Min (this IEnumerable<int> source);
public static decimal? Min (this IEnumerable<decimal?> source);
public static decimal Min (this IEnumerable<decimal> source);
public static TResult? Min<TSource,TResult> (this IEnumerable<TSource> source, Func<TSource,TResult> selector);
public static float Min<TSource> (this IEnumerable<TSource> source, Func<TSource,float> selector);
public static float? Min<TSource> (this IEnumerable<TSource> source, Func<TSource,float?> selector);
public static long? Min<TSource> (this IEnumerable<TSource> source, Func<TSource,long?> selector);
public static int? Min<TSource> (this IEnumerable<TSource> source, Func<TSource,int?> selector);
public static double? Min<TSource> (this IEnumerable<TSource> source, Func<TSource,double?> selector);
public static long Min<TSource> (this IEnumerable<TSource> source, Func<TSource,long> selector);
public static int Min<TSource> (this IEnumerable<TSource> source, Func<TSource,int> selector);
public static double Min<TSource> (this IEnumerable<TSource> source, Func<TSource,double> selector);
public static decimal Min<TSource> (this IEnumerable<TSource> source, Func<TSource,decimal> selector);
public static TSource? Min<TSource> (this IEnumerable<TSource> source);
public static decimal? Min<TSource> (this IEnumerable<TSource> source, Func<TSource,decimal?> selector);

OrderBy

@ [APIドキュメント]

public static IOrderedEnumerable<TSource> OrderBy<TSource,TKey> (this IEnumerable<TSource> source, Func<TSource,TKey> keySelector);
public static IOrderedEnumerable<TSource> OrderBy<TSource,TKey> (this IEnumerable<TSource> source, Func<TSource,TKey> keySelector, IComparer<TKey>? comparer);

OrderByDescending

@ [APIドキュメント]

public static IOrderedEnumerable<TSource> OrderByDescending<TSource,TKey> (this IEnumerable<TSource> source, Func<TSource,TKey> keySelector);
public static IOrderedEnumerable<TSource> OrderByDescending<TSource,TKey> (this IEnumerable<TSource> source, Func<TSource,TKey> keySelector, IComparer<TKey>? comparer);

Select

@ [APIドキュメント]

public static IEnumerable<TResult> Select<TSource,TResult> (this IEnumerable<TSource> source, Func<TSource,int,TResult> selector);
public static IEnumerable<TResult> Select<TSource,TResult> (this IEnumerable<TSource> source, Func<TSource,TResult> selector);

Skip

@ [APIドキュメント]

public static IEnumerable<TSource> Skip<TSource> (this IEnumerable<TSource> source, int count);

Sum

@ [APIドキュメント]

public static int? Sum (this IEnumerable<int?> source);
public static float? Sum (this IEnumerable<float?> source);
public static long? Sum (this IEnumerable<long?> source);
public static float Sum (this IEnumerable<float> source);
public static double? Sum (this IEnumerable<double?> source);
public static int Sum (this IEnumerable<int> source);
public static long Sum (this IEnumerable<long> source);
public static double Sum (this IEnumerable<double> source);
public static decimal Sum (this IEnumerable<decimal> source);
public static decimal? Sum (this IEnumerable<decimal?> source);
public static float Sum<TSource> (this IEnumerable<TSource> source, Func<TSource,float> selector);
public static float? Sum<TSource> (this IEnumerable<TSource> source, Func<TSource,float?> selector);
public static long? Sum<TSource> (this IEnumerable<TSource> source, Func<TSource,long?> selector);
public static int? Sum<TSource> (this IEnumerable<TSource> source, Func<TSource,int?> selector);
public static double? Sum<TSource> (this IEnumerable<TSource> source, Func<TSource,double?> selector);
public static decimal? Sum<TSource> (this IEnumerable<TSource> source, Func<TSource,decimal?> selector);
public static long Sum<TSource> (this IEnumerable<TSource> source, Func<TSource,long> selector);
public static int Sum<TSource> (this IEnumerable<TSource> source, Func<TSource,int> selector);
public static double Sum<TSource> (this IEnumerable<TSource> source, Func<TSource,double> selector);
public static decimal Sum<TSource> (this IEnumerable<TSource> source, Func<TSource,decimal> selector);

Take

@ [APIドキュメント]

public static IEnumerable<TSource> Take<TSource> (this IEnumerable<TSource> source, int count);

ToArray

@ [APIドキュメント]

public static TSource[] ToArray<TSource> (this IEnumerable<TSource> source);

ToList

@ [APIドキュメント]

public static List<TSource> ToList<TSource> (this IEnumerable<TSource> source);

Where

@ [APIドキュメント]

public static IEnumerable<TSource> Where<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate);
public static IEnumerable<TSource> Where<TSource> (this IEnumerable<TSource> source, Func<TSource,int,bool> predicate);