Enumerable クラス (System.Linq 名前空間)
public static class Enumerable
継承:Object → Enumerable
- IEnumerable<T>インターフェイスを実装するオブジェクトに対するLINQの操作を実行するための一連の静的メソッドを拡張メソッドで提供します。
メソッド
All
public static bool All<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate);
Any
public static bool Any<TSource> (this IEnumerable<TSource> source);
public static bool Any<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate);
Average
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
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
public static int Count<TSource> (this IEnumerable<TSource> source);
public static int Count<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate);
Distinct
public static IEnumerable<TSource> Distinct<TSource> (this IEnumerable<TSource> source);
public static IEnumerable<TSource> Distinct<TSource> (this IEnumerable<TSource> source, IEqualityComparer<TSource>? comparer);
ElementAt
public static TSource ElementAt<TSource> (this IEnumerable<TSource> source, int index);
First
public static TSource First<TSource> (this IEnumerable<TSource> source);
public static TSource First<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate);
FirstOrDefault
public static TSource? FirstOrDefault<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate);
public static TSource? FirstOrDefault<TSource> (this IEnumerable<TSource> source);
public static TSource FirstOrDefault<TSource> (this IEnumerable<TSource> source, TSource defaultValue);
public static TSource FirstOrDefault<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate, TSource defaultValue);
Last
public static TSource Last<TSource> (this IEnumerable<TSource> source);
public static TSource Last<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate);
LastOrDefault
public static TSource LastOrDefault<TSource> (this IEnumerable<TSource> source, TSource defaultValue);
public static TSource LastOrDefault<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate, TSource defaultValue);
public static TSource? LastOrDefault<TSource> (this IEnumerable<TSource> source);
public static TSource? LastOrDefault<TSource> (this IEnumerable<TSource> source, Func<TSource,bool> predicate);
Max
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
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
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
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
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
public static IEnumerable<TSource> Skip<TSource> (this IEnumerable<TSource> source, int count);
Sum
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
public static IEnumerable<TSource> Take<TSource> (this IEnumerable<TSource> source, int count);
ToArray
public static TSource[] ToArray<TSource> (this IEnumerable<TSource> source);
ToList
public static List<TSource> ToList<TSource> (this IEnumerable<TSource> source);
Where
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);