using System; using System.Collections; using System.Collections.Generic; using System.Runtime.CompilerServices; namespace System.Linq { // 概要: // System.Collections.Generic.IEnumerable<T> を実装するオブジェクトをクエリするための一連の static // (Visual Basic では Shared) メソッドを提供します。 public static class Enumerable { // 概要: // シーケンスにアキュムレータ関数を適用します。 // // パラメータ: // source: // 集計対象の System.Collections.Generic.IEnumerable<T>。 // // func: // 各要素に対して呼び出すアキュムレータ関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 最終的なアキュムレータ値。 // // 例外: // System.ArgumentNullException: // source または func が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static TSource Aggregate<TSource>(this IEnumerable<TSource> source, Func<TSource, TSource, TSource> func); // // 概要: // シーケンスにアキュムレータ関数を適用します。指定されたシード値が最初のアキュムレータ値として使用されます。 // // パラメータ: // source: // 集計対象の System.Collections.Generic.IEnumerable<T>。 // // seed: // 最初のアキュムレータ値。 // // func: // 各要素に対して呼び出すアキュムレータ関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TAccumulate: // アキュムレータ値の型。 // // 戻り値: // 最終的なアキュムレータ値。 // // 例外: // System.ArgumentNullException: // source または func が null です。 public static TAccumulate Aggregate<TSource, TAccumulate>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func); // // 概要: // シーケンスにアキュムレータ関数を適用します。指定したシード値は最初のアキュムレータ値として使用され、指定した関数は結果値の選択に使用されます。 // // パラメータ: // source: // 集計対象の System.Collections.Generic.IEnumerable<T>。 // // seed: // 最初のアキュムレータ値。 // // func: // 各要素に対して呼び出すアキュムレータ関数。 // // resultSelector: // 最終的なアキュムレータ値を結果値に変換する関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TAccumulate: // アキュムレータ値の型。 // // TResult: // 結果の値の型。 // // 戻り値: // 変換された最終的なアキュムレータ値。 // // 例外: // System.ArgumentNullException: // source、func、または resultSelector が null です。 public static TResult Aggregate<TSource, TAccumulate, TResult>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, Func<TAccumulate, TResult> resultSelector); // // 概要: // シーケンスのすべての要素が条件を満たしているかどうかを判断します。 // // パラメータ: // source: // 述語を適用する要素を格納している System.Collections.Generic.IEnumerable<T>。 // // predicate: // 各要素が条件を満たしているかどうかをテストする関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 指定された述語でソース シーケンスのすべての要素がテストに合格する場合は true。それ以外の場合は false。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 public static bool All<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate); // // 概要: // シーケンスに要素が含まれているかどうかを判断します。 // // パラメータ: // source: // 空かどうかを確認する System.Collections.Generic.IEnumerable<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // ソース シーケンスに要素が含まれている場合は true。それ以外の場合は false。 // // 例外: // System.ArgumentNullException: // source が null です。 public static bool Any<TSource>(this IEnumerable<TSource> source); // // 概要: // シーケンスの任意の要素が条件を満たしているかどうかを判断します。 // // パラメータ: // source: // 述語を適用する要素を含む System.Collections.Generic.IEnumerable<T>。 // // predicate: // 各要素が条件を満たしているかどうかをテストする関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 指定された述語でソース シーケンスの要素がテストに合格する場合は true。それ以外の場合は false。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 public static bool Any<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate); // // 概要: // System.Collections.Generic.IEnumerable<T> として型指定された入力を返します。 // // パラメータ: // source: // System.Collections.Generic.IEnumerable<T> として型指定するシーケンス。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // System.Collections.Generic.IEnumerable<T> として型指定された入力シーケンス。 public static IEnumerable<TSource> AsEnumerable<TSource>(this IEnumerable<TSource> source); // // 概要: // null 許容の System.Decimal 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる null 許容の System.Decimal 値のシーケンス。 // // 戻り値: // 値のシーケンスの平均値。ソース シーケンスが空か null 値のみを含む場合は null。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.OverflowException: // シーケンス内の要素の合計が System.Decimal.MaxValue を超えています。 public static decimal? Average(this IEnumerable<decimal?> source); // // 概要: // System.Decimal 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる System.Decimal 値のシーケンス。 // // 戻り値: // 値のシーケンスの平均値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 // // System.OverflowException: // シーケンス内の要素の合計が System.Decimal.MaxValue を超えています。 public static decimal Average(this IEnumerable<decimal> source); // // 概要: // null 許容の System.Double 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる null 許容の System.Double 値のシーケンス。 // // 戻り値: // 値のシーケンスの平均値。ソース シーケンスが空か null 値のみを含む場合は null。 // // 例外: // System.ArgumentNullException: // source が null です。 public static double? Average(this IEnumerable<double?> source); // // 概要: // System.Double 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる System.Double 値のシーケンス。 // // 戻り値: // 値のシーケンスの平均値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static double Average(this IEnumerable<double> source); // // 概要: // null 許容の System.Single 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる null 許容の System.Single 値のシーケンス。 // // 戻り値: // 値のシーケンスの平均値。ソース シーケンスが空か null 値のみを含む場合は null。 // // 例外: // System.ArgumentNullException: // source が null です。 public static float? Average(this IEnumerable<float?> source); // // 概要: // System.Single 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる System.Single 値のシーケンス。 // // 戻り値: // 値のシーケンスの平均値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static float Average(this IEnumerable<float> source); // // 概要: // null 許容の System.Int32 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる null 許容の System.Int32 値のシーケンス。 // // 戻り値: // 値のシーケンスの平均値。ソース シーケンスが空か null 値のみを含む場合は null。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.OverflowException: // シーケンス内の要素の合計が System.Int64.MaxValue を超えています。 public static double? Average(this IEnumerable<int?> source); // // 概要: // System.Int32 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる System.Int32 値のシーケンス。 // // 戻り値: // 値のシーケンスの平均値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 // // System.OverflowException: // シーケンス内の要素の合計が System.Int64.MaxValue を超えています。 public static double Average(this IEnumerable<int> source); // // 概要: // null 許容の System.Int64 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる null 許容の System.Int64 値のシーケンス。 // // 戻り値: // 値のシーケンスの平均値。ソース シーケンスが空か null 値のみを含む場合は null。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.OverflowException: // シーケンス内の要素の合計が System.Int64.MaxValue を超えています。 public static double? Average(this IEnumerable<long?> source); // // 概要: // System.Int64 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる System.Int64 値のシーケンス。 // // 戻り値: // 値のシーケンスの平均値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 // // System.OverflowException: // シーケンス内の要素の合計が System.Int64.MaxValue を超えています。 public static double Average(this IEnumerable<long> source); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の System.Decimal 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 値のシーケンスの平均値。ソース シーケンスが空か null 値のみを含む場合は null。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.OverflowException: // シーケンス内の要素の合計が System.Decimal.MaxValue を超えています。 public static decimal? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal?> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する System.Decimal 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値の計算に使用される値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 値のシーケンスの平均値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 // // System.OverflowException: // シーケンス内の要素の合計が System.Decimal.MaxValue を超えています。 public static decimal Average<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の System.Double 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 値のシーケンスの平均値。ソース シーケンスが空か null 値のみを含む場合は null。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static double? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する System.Double 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 値のシーケンスの平均値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static double Average<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の System.Single 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 値のシーケンスの平均値。ソース シーケンスが空か null 値のみを含む場合は null。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static float? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, float?> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する System.Single 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 値のシーケンスの平均値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static float Average<TSource>(this IEnumerable<TSource> source, Func<TSource, float> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の System.Int32 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 値のシーケンスの平均値。ソース シーケンスが空か null 値のみを含む場合は null。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.OverflowException: // シーケンス内の要素の合計が System.Int64.MaxValue を超えています。 public static double? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, int?> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する System.Int32 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 値のシーケンスの平均値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 // // System.OverflowException: // シーケンス内の要素の合計が System.Int64.MaxValue を超えています。 public static double Average<TSource>(this IEnumerable<TSource> source, Func<TSource, int> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の System.Int64 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 値のシーケンスの平均値。ソース シーケンスが空か null 値のみを含む場合は null。 public static double? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, long?> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する System.Int64 値のシーケンスの平均値を計算します。 // // パラメータ: // source: // 平均値計算の対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // Tsource: // ソースの要素の型。 // // 戻り値: // 値のシーケンスの平均値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 // // System.OverflowException: // シーケンス内の要素の合計が System.Int64.MaxValue を超えています。 public static double Average<TSource>(this IEnumerable<TSource> source, Func<TSource, long> selector); // // 概要: // System.Collections.IEnumerable の要素を、指定した型に変換します。 // // パラメータ: // source: // 変換する要素が格納されている System.Collections.IEnumerable。 // // 型パラメータ: // TResult: // source の要素の変換後の型。 // // 戻り値: // 指定した型に変換されたソース シーケンスの各要素が格納されている System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidCastException: // シーケンスの要素を TResult 型にキャストできません。 public static IEnumerable<TResult> Cast<TResult>(this IEnumerable source); // // 概要: // 2 つのシーケンスを連結します。 // // パラメータ: // first: // 連結する最初のシーケンス。 // // second: // 最初のシーケンスに連結するシーケンス。 // // 型パラメータ: // TSource: // 入力シーケンスの要素の型。 // // 戻り値: // 2 つの入力シーケンスの連結された要素が格納されている System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // first または second が null です。 public static IEnumerable<TSource> Concat<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second); // // 概要: // 既定の等値比較演算子を使用して、指定した要素がシーケンスに含まれているかどうかを判断します。 // // パラメータ: // source: // 値の検索対象となるシーケンス。 // // value: // シーケンス内で検索する値。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 指定した値を持つ要素がソース シーケンスに含まれている場合は true。それ以外は false。 // // 例外: // System.ArgumentNullException: // source が null です。 public static bool Contains<TSource>(this IEnumerable<TSource> source, TSource value); // // 概要: // 指定した System.Collections.Generic.IEqualityComparer<T> を使用して、指定した要素がシーケンスに含まれているかどうかを判断します。 // // パラメータ: // source: // 値の検索対象となるシーケンス。 // // value: // シーケンス内で検索する値。 // // comparer: // 値を比較する等値比較演算子。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 指定した値を持つ要素がソース シーケンスに含まれている場合は true。それ以外は false。 // // 例外: // System.ArgumentNullException: // source が null です。 public static bool Contains<TSource>(this IEnumerable<TSource> source, TSource value, IEqualityComparer<TSource> comparer); // // 概要: // シーケンス内の要素数を返します。 // // パラメータ: // source: // カウントする要素が格納されているシーケンス。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 入力シーケンス内の要素数。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.OverflowException: // source 内の要素数が System.Int32.MaxValue を超えています。 public static int Count<TSource>(this IEnumerable<TSource> source); // // 概要: // 条件を満たす、指定されたシーケンス内の要素の数を表す数値を返します。 // // パラメータ: // source: // テストおよびカウントする要素が格納されているシーケンス。 // // predicate: // 各要素が条件を満たしているかどうかをテストする関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 述語関数の条件を満たす、シーケンス内の要素数を表す数値。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 // // System.OverflowException: // source 内の要素数が System.Int32.MaxValue を超えています。 public static int Count<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate); // // 概要: // 指定したシーケンスの要素を返します。シーケンスが空の場合はシングルトン コレクションにある型パラメータの既定値を返します。 // // パラメータ: // source: // シーケンスが空の場合に、既定値を返すシーケンス。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // source が空の場合は default(TSource) が格納されている System.Collections.Generic.IEnumerable<T>。それ以外の場合は // source。 // // 例外: // System.ArgumentNullException: // source が null です。 public static IEnumerable<TSource> DefaultIfEmpty<TSource>(this IEnumerable<TSource> source); // // 概要: // 指定されたシーケンスの要素を返します。シーケンスが空の場合はシングルトン コレクションにある型パラメータの既定値を返します。 // // パラメータ: // source: // シーケンスが空の場合に、指定された値を返すシーケンス。 // // defaultValue: // シーケンスが空の場合に返す値。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // source が空の場合は defaultValue が格納されている System.Collections.Generic.IEnumerable<T>。それ以外の場合は // source。 public static IEnumerable<TSource> DefaultIfEmpty<TSource>(this IEnumerable<TSource> source, TSource defaultValue); // // 概要: // 既定の等値比較演算子を使用して値を比較することにより、シーケンスから一意の要素を返します。 // // パラメータ: // source: // 重複する要素を削除する対象となるシーケンス。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // ソース シーケンスの一意の要素を格納する System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source が null です。 public static IEnumerable<TSource> Distinct<TSource>(this IEnumerable<TSource> source); // // 概要: // 指定された System.Collections.Generic.IEqualityComparer<T> を使用して値を比較することにより、シーケンスから一意の要素を返します。 // // パラメータ: // source: // 重複する要素を削除する対象となるシーケンス。 // // comparer: // 値を比較する System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // ソース シーケンスの一意の要素を格納する System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source が null です。 public static IEnumerable<TSource> Distinct<TSource>(this IEnumerable<TSource> source, IEqualityComparer<TSource> comparer); // // 概要: // シーケンス内の指定されたインデックス位置にある要素を返します。 // // パラメータ: // source: // 返される要素が含まれる System.Collections.Generic.IEnumerable<T>。 // // index: // 取得する要素の、0 から始まるインデックス。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // ソース シーケンス内の指定された位置にある要素。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.ArgumentOutOfRangeException: // index が 0 未満か source に含まれている要素数以上の値です。 public static TSource ElementAt<TSource>(this IEnumerable<TSource> source, int index); // // 概要: // シーケンス内の指定されたインデックス位置にある要素を返します。インデックスが範囲外の場合は既定値を返します。 // // パラメータ: // source: // 返される要素が含まれる System.Collections.Generic.IEnumerable<T>。 // // index: // 取得する要素の、0 から始まるインデックス。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // インデックスがソース シーケンスの範囲外の場合は default (TSource)。それ以外の場合は、ソース シーケンスの指定した位置にある要素。 // // 例外: // System.ArgumentNullException: // source が null です。 public static TSource ElementAtOrDefault<TSource>(this IEnumerable<TSource> source, int index); // // 概要: // 指定した型引数を持つ空の System.Collections.Generic.IEnumerable<T> を返します。 // // 型パラメータ: // TResult: // 返されるジェネリック System.Collections.Generic.IEnumerable<T> の型パラメータに割り当てる型。 // // 戻り値: // 型引数が TResult である空の System.Collections.Generic.IEnumerable<T>。 public static IEnumerable<TResult> Empty<TResult>(); // // 概要: // 既定の等値比較演算子を使用して値を比較することにより、2 つのシーケンスの差集合を生成します。 // // パラメータ: // first: // second には含まれていないが、返される要素を含む System.Collections.Generic.IEnumerable<T>。 // // second: // 最初のシーケンスにも含まれ、返されたシーケンスからは削除される要素を含む System.Collections.Generic.IEnumerable<T>。 // // 型パラメータ: // TSource: // 入力シーケンスの要素の型。 // // 戻り値: // 2 つのシーケンスの要素の差集合が格納されているシーケンス。 // // 例外: // System.ArgumentNullException: // first または second が null です。 public static IEnumerable<TSource> Except<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second); // // 概要: // 指定された System.Collections.Generic.IEqualityComparer<T> を使用して値を比較することにより、2 // つのシーケンスの差集合を生成します。 // // パラメータ: // first: // second には含まれていないが、返される要素を含む System.Collections.Generic.IEnumerable<T>。 // // second: // 最初のシーケンスにも含まれ、返されたシーケンスからは削除される要素を含む System.Collections.Generic.IEnumerable<T>。 // // comparer: // 値を比較する System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TSource: // 入力シーケンスの要素の型。 // // 戻り値: // 2 つのシーケンスの要素の差集合が格納されているシーケンス。 // // 例外: // System.ArgumentNullException: // first または second が null です。 public static IEnumerable<TSource> Except<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer); // // 概要: // シーケンスの最初の要素を返します。 // // パラメータ: // source: // 最初の要素を返す System.Collections.Generic.IEnumerable<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 指定されたシーケンスの最初の要素。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // ソース シーケンスが空です。 public static TSource First<TSource>(this IEnumerable<TSource> source); // // 概要: // 指定された条件を満たす、シーケンスの最初の要素を返します。 // // パラメータ: // source: // 返される要素が含まれる System.Collections.Generic.IEnumerable<T>。 // // predicate: // 各要素が条件を満たしているかどうかをテストする関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 指定された述語関数でテストに合格する、シーケンスの最初の要素。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 // // System.InvalidOperationException: // predicate の条件を満たす要素がありません。 または ソース シーケンスが空です。 public static TSource First<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate); // // 概要: // シーケンスの最初の要素を返します。シーケンスに要素が含まれていない場合は既定値を返します。 // // パラメータ: // source: // 最初の要素を返す System.Collections.Generic.IEnumerable<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // source が空の場合は default(TSource)。それ以外の場合は source の最初の要素。 // // 例外: // System.ArgumentNullException: // source が null です。 public static TSource FirstOrDefault<TSource>(this IEnumerable<TSource> source); // // 概要: // 条件を満たす、シーケンスの最初の要素を返します。このような要素が見つからない場合は既定値を返します。 // // パラメータ: // source: // 返される要素が含まれる System.Collections.Generic.IEnumerable<T>。 // // predicate: // 各要素が条件を満たしているかどうかをテストする関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // source が空の場合または predicate で指定されたテストに合格する要素がない場合は default(TSource)。それ以外の場合は、predicate // で指定されたテストに合格する、source の最初の要素。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 public static TSource FirstOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate); // // 概要: // 指定されたキー セレクタ関数に従ってシーケンスの要素をグループ化します。 // // パラメータ: // source: // グループ化する要素を含む System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素のキーを抽出する関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // 戻り値: // C# では IEnumerable<IGrouping<TKey, TSource>>、Visual Basic では IEnumerable(Of // IGrouping(Of TKey, TSource))。ここでは、各 System.Linq.IGrouping<TKey,TElement> // オブジェクトに、オブジェクトのシーケンス、およびキーが格納されています。 // // 例外: // System.ArgumentNullException: // source または keySelector が null です。 public static IEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector); // // 概要: // 指定されたキー セレクタ関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。 // // パラメータ: // source: // グループ化する要素を含む System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素のキーを抽出する関数。 // // resultSelector: // 各グループから結果値を作成する関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // TResult: // resultSelector によって返される結果値の型。 // // 戻り値: // TResult 型の要素のコレクション。各要素は、グループとそのキーの射影を表します。 public static IEnumerable<TResult> GroupBy<TSource, TKey, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector); // // 概要: // 指定されたキー セレクタ関数に従ってシーケンスの要素をグループ化し、指定された関数を使用して各グループの要素を射影します。 // // パラメータ: // source: // グループ化する要素を含む System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素のキーを抽出する関数。 // // elementSelector: // ソースの各要素を System.Linq.IGrouping<TKey,TElement> の要素に割り当てる関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // TElement: // System.Linq.IGrouping<TKey,TElement> の要素の型。 // // 戻り値: // C# では IEnumerable<IGrouping<TKey, TElement>>、Visual Basic では IEnumerable(Of // IGrouping(Of TKey, TElement))。ここでは、各 System.Linq.IGrouping<TKey,TElement> // オブジェクトに、TElement 型のオブジェクトのコレクション、およびキーが格納されています。 // // 例外: // System.ArgumentNullException: // source、keySelector、または elementSelector が null です。 public static IEnumerable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector); // // 概要: // 指定されたキー セレクタ関数に従ってシーケンスの要素をグループ化し、指定された比較演算子を使用してキーを比較します。 // // パラメータ: // source: // グループ化する要素を含む System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素のキーを抽出する関数。 // // comparer: // キーを比較する System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // 戻り値: // C# では IEnumerable<IGrouping<TKey, TSource>>、Visual Basic では IEnumerable(Of // IGrouping(Of TKey, TSource))。ここでは、各 System.Linq.IGrouping<TKey,TElement> // オブジェクトに、オブジェクトのコレクション、およびキーが格納されています。 // // 例外: // System.ArgumentNullException: // source または keySelector が null です。 public static IEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer); // // 概要: // 指定されたキー セレクタ関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。キーの比較には、指定された比較演算子を使用します。 // // パラメータ: // source: // グループ化する要素を含む System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素のキーを抽出する関数。 // // resultSelector: // 各グループから結果値を作成する関数。 // // comparer: // キーの比較対象となる System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // TResult: // resultSelector によって返される結果値の型。 // // 戻り値: // TResult 型の要素のコレクション。各要素は、グループとそのキーの射影を表します。 public static IEnumerable<TResult> GroupBy<TSource, TKey, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector, IEqualityComparer<TKey> comparer); // // 概要: // 指定されたキー セレクタ関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。各グループの要素は、指定された関数を使用して射影されます。 // // パラメータ: // source: // グループ化する要素を含む System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素のキーを抽出する関数。 // // elementSelector: // ソースの各要素を System.Linq.IGrouping<TKey,TElement> の要素に割り当てる関数。 // // resultSelector: // 各グループから結果値を作成する関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // TElement: // 各 System.Linq.IGrouping<TKey,TElement> の要素の型。 // // TResult: // resultSelector によって返される結果値の型。 // // 戻り値: // TResult 型の要素のコレクション。各要素は、グループとそのキーの射影を表します。 public static IEnumerable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector); // // 概要: // キー セレクタ関数に従ってシーケンスの要素をグループ化します。キーの比較には、比較演算子を使用し、各グループの要素の射影には、指定された関数を使用します。 // // パラメータ: // source: // グループ化する要素を含む System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素のキーを抽出する関数。 // // elementSelector: // ソースの各要素を System.Linq.IGrouping<TKey,TElement> の要素に割り当てる関数。 // // comparer: // キーを比較する System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // TElement: // System.Linq.IGrouping<TKey,TElement> の要素の型。 // // 戻り値: // C# では IEnumerable<IGrouping<TKey, TElement>>、Visual Basic では IEnumerable(Of // IGrouping(Of TKey, TElement))。ここでは、各 System.Linq.IGrouping<TKey,TElement> // オブジェクトに、TElement 型のオブジェクトのコレクション、およびキーが格納されています。 // // 例外: // System.ArgumentNullException: // source、keySelector、または elementSelector が null です。 public static IEnumerable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer); // // 概要: // 指定されたキー セレクタ関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。キー値の比較には、指定された比較演算子を使用し、各グループの要素の射影には、指定された関数を使用します。 // // パラメータ: // source: // グループ化する要素を含む System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素のキーを抽出する関数。 // // elementSelector: // ソースの各要素を System.Linq.IGrouping<TKey,TElement> の要素に割り当てる関数。 // // resultSelector: // 各グループから結果値を作成する関数。 // // comparer: // キーの比較対象となる System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // TElement: // 各 System.Linq.IGrouping<TKey,TElement> の要素の型。 // // TResult: // resultSelector によって返される結果値の型。 // // 戻り値: // TResult 型の要素のコレクション。各要素は、グループとそのキーの射影を表します。 public static IEnumerable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector, IEqualityComparer<TKey> comparer); // // 概要: // キーが等しいかどうかに基づいて 2 つのシーケンスの要素を相互に関連付け、その結果をグループ化します。キーの比較には既定の等値比較演算子が使用されます。 // // パラメータ: // outer: // 結合する最初のシーケンス。 // // inner: // 最初のシーケンスに結合するシーケンス。 // // outerKeySelector: // 最初のシーケンスの各要素から結合キーを抽出する関数。 // // innerKeySelector: // 2 番目のシーケンスの各要素から結合キーを抽出する関数。 // // resultSelector: // 最初のシーケンスの要素と、2 番目のシーケンスの一致する要素のコレクションから結果の要素を作成する関数。 // // 型パラメータ: // TOuter: // 最初のシーケンスの要素の型。 // // TInner: // 2 番目のシーケンスの要素の型。 // // TKey: // キー セレクタ関数によって返されるキーの型。 // // TResult: // 結果の要素の型。 // // 戻り値: // 2 つのシーケンスに対してグループ化結合を実行して取得する、TResult 型の要素が格納されている System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // outer、inner、outerKeySelector、innerKeySelector、または resultSelector が null です。 public static IEnumerable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector); // // 概要: // キーが等しいかどうかに基づいて 2 つのシーケンスの要素を相互に関連付け、その結果をグループ化します。指定された System.Collections.Generic.IEqualityComparer<T> // を使用してキーを比較します。 // // パラメータ: // outer: // 結合する最初のシーケンス。 // // inner: // 最初のシーケンスに結合するシーケンス。 // // outerKeySelector: // 最初のシーケンスの各要素から結合キーを抽出する関数。 // // innerKeySelector: // 2 番目のシーケンスの各要素から結合キーを抽出する関数。 // // resultSelector: // 最初のシーケンスの要素と、2 番目のシーケンスの一致する要素のコレクションから結果の要素を作成する関数。 // // comparer: // キーをハッシュして比較する System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TOuter: // 最初のシーケンスの要素の型。 // // TInner: // 2 番目のシーケンスの要素の型。 // // TKey: // キー セレクタ関数によって返されるキーの型。 // // TResult: // 結果の要素の型。 // // 戻り値: // 2 つのシーケンスに対してグループ化結合を実行して取得する、TResult 型の要素が格納されている System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // outer、inner、outerKeySelector、innerKeySelector、または resultSelector が null です。 public static IEnumerable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector, IEqualityComparer<TKey> comparer); // // 概要: // 既定の等値比較演算子を使用して値を比較することにより、2 つのシーケンスの積集合を生成します。 // // パラメータ: // first: // second にも含まれる、返される一意の要素を含む System.Collections.Generic.IEnumerable<T>。 // // second: // 最初のシーケンスにも含まれる、返される一意の要素を含む System.Collections.Generic.IEnumerable<T>。 // // 型パラメータ: // TSource: // 入力シーケンスの要素の型。 // // 戻り値: // 2 つのシーケンスの積集合を構成する要素が格納されているシーケンス。 // // 例外: // System.ArgumentNullException: // first または second が null です。 public static IEnumerable<TSource> Intersect<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second); // // 概要: // 指定された System.Collections.Generic.IEqualityComparer<T> を使用して値を比較することにより、2 // つのシーケンスの積集合を生成します。 // // パラメータ: // first: // second にも含まれる、返される一意の要素を含む System.Collections.Generic.IEnumerable<T>。 // // second: // 最初のシーケンスにも含まれる、返される一意の要素を含む System.Collections.Generic.IEnumerable<T>。 // // comparer: // 値を比較する System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TSource: // 入力シーケンスの要素の型。 // // 戻り値: // 2 つのシーケンスの積集合を構成する要素が格納されているシーケンス。 // // 例外: // System.ArgumentNullException: // first または second が null です。 public static IEnumerable<TSource> Intersect<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer); // // 概要: // 一致するキーに基づいて 2 つのシーケンスの要素を相互に関連付けます。キーの比較には既定の等値比較演算子が使用されます。 // // パラメータ: // outer: // 結合する最初のシーケンス。 // // inner: // 最初のシーケンスに結合するシーケンス。 // // outerKeySelector: // 最初のシーケンスの各要素から結合キーを抽出する関数。 // // innerKeySelector: // 2 番目のシーケンスの各要素から結合キーを抽出する関数。 // // resultSelector: // 一致する 2 つの要素から結果の要素を作成する関数。 // // 型パラメータ: // TOuter: // 最初のシーケンスの要素の型。 // // TInner: // 2 番目のシーケンスの要素の型。 // // TKey: // キー セレクタ関数によって返されるキーの型。 // // TResult: // 結果の要素の型。 // // 戻り値: // 2 つのシーケンスに対して内部結合を実行して取得する、TResult 型の要素が格納されている System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // outer、inner、outerKeySelector、innerKeySelector、または resultSelector が null です。 public static IEnumerable<TResult> Join<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector); // // 概要: // 一致するキーに基づいて 2 つのシーケンスの要素を相互に関連付けます。指定された System.Collections.Generic.IEqualityComparer<T> // を使用してキーを比較します。 // // パラメータ: // outer: // 結合する最初のシーケンス。 // // inner: // 最初のシーケンスに結合するシーケンス。 // // outerKeySelector: // 最初のシーケンスの各要素から結合キーを抽出する関数。 // // innerKeySelector: // 2 番目のシーケンスの各要素から結合キーを抽出する関数。 // // resultSelector: // 一致する 2 つの要素から結果の要素を作成する関数。 // // comparer: // キーをハッシュして比較する System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TOuter: // 最初のシーケンスの要素の型。 // // TInner: // 2 番目のシーケンスの要素の型。 // // TKey: // キー セレクタ関数によって返されるキーの型。 // // TResult: // 結果の要素の型。 // // 戻り値: // 2 つのシーケンスに対して内部結合を実行して取得する、TResult 型の要素が格納されている System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // outer、inner、outerKeySelector、innerKeySelector、または resultSelector が null です。 public static IEnumerable<TResult> Join<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey> comparer); // // 概要: // シーケンスの最後の要素を返します。 // // パラメータ: // source: // 最後の要素を返す System.Collections.Generic.IEnumerable<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // ソース シーケンスの最後の位置にある値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // ソース シーケンスが空です。 public static TSource Last<TSource>(this IEnumerable<TSource> source); // // 概要: // 指定された条件を満たす、シーケンスの最後の要素を返します。 // // パラメータ: // source: // 返される要素が含まれる System.Collections.Generic.IEnumerable<T>。 // // predicate: // 各要素が条件を満たしているかどうかをテストする関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 指定された述語関数でテストに合格する、シーケンスの最後の要素。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 // // System.InvalidOperationException: // predicate の条件を満たす要素がありません。 または ソース シーケンスが空です。 public static TSource Last<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate); // // 概要: // シーケンスの最後の要素を返します。シーケンスに要素が含まれていない場合は既定値を返します。 // // パラメータ: // source: // 最後の要素を返す System.Collections.Generic.IEnumerable<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // ソース シーケンスが空の場合は default (TSource)。それ以外の場合は System.Collections.Generic.IEnumerable<T> // の最後の要素。 // // 例外: // System.ArgumentNullException: // source が null です。 public static TSource LastOrDefault<TSource>(this IEnumerable<TSource> source); // // 概要: // 条件を満たす、シーケンスの最後の要素を返します。このような要素が見つからない場合は既定値を返します。 // // パラメータ: // source: // 返される要素が含まれる System.Collections.Generic.IEnumerable<T>。 // // predicate: // 各要素が条件を満たしているかどうかをテストする関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスが空の場合、または述語関数でテストに合格する要素がない場合は default (TSource)。それ以外の場合は、述語関数でテストに合格する最後の要素。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 public static TSource LastOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate); // // 概要: // シーケンス内の要素の合計数を表す System.Int64 を返します。 // // パラメータ: // source: // カウントする要素が格納されている System.Collections.Generic.IEnumerable<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // ソース シーケンスの要素数。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.OverflowException: // 要素数が System.Int64.MaxValue を超えています。 public static long LongCount<TSource>(this IEnumerable<TSource> source); // // 概要: // シーケンス内で条件を満たす要素の数を表す System.Int64 を返します。 // // パラメータ: // source: // カウントする要素が格納されている System.Collections.Generic.IEnumerable<T>。 // // predicate: // 各要素が条件を満たしているかどうかをテストする関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 述語関数の条件を満たす、シーケンス内の要素数を表す数値。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 // // System.OverflowException: // 一致する要素数が System.Int64.MaxValue を超えています。 public static long LongCount<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate); // // 概要: // null 許容の System.Decimal 値のシーケンスの最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる null 許容の System.Decimal 値のシーケンス。 // // 戻り値: // シーケンスの最大値に対応する Nullable<Decimal> 型 (C# の場合) または Nullable(Of Decimal) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source が null です。 public static decimal? Max(this IEnumerable<decimal?> source); // // 概要: // System.Decimal 値のシーケンスの最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる System.Decimal 値のシーケンス。 // // 戻り値: // シーケンスの最大値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static decimal Max(this IEnumerable<decimal> source); // // 概要: // null 許容の System.Double 値のシーケンスの最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる null 許容の System.Double 値のシーケンス。 // // 戻り値: // シーケンスの最大値に対応する Nullable<Double> 型 (C# の場合) または Nullable(Of Double) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source が null です。 public static double? Max(this IEnumerable<double?> source); // // 概要: // System.Double 値のシーケンスの最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる System.Double 値のシーケンス。 // // 戻り値: // シーケンスの最大値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static double Max(this IEnumerable<double> source); // // 概要: // null 許容の System.Single 値のシーケンスの最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる null 許容の System.Single 値のシーケンス。 // // 戻り値: // シーケンスの最大値に対応する Nullable<Single> 型 (C# の場合) または Nullable(Of Single) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source が null です。 public static float? Max(this IEnumerable<float?> source); // // 概要: // System.Single 値のシーケンスの最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる System.Single 値のシーケンス。 // // 戻り値: // シーケンスの最大値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static float Max(this IEnumerable<float> source); // // 概要: // null 許容の System.Int32 値のシーケンスの最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる null 許容の System.Int32 値のシーケンス。 // // 戻り値: // シーケンスの最大値に対応する Nullable<Int32> 型 (C# の場合) または Nullable(Of Int32) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source が null です。 public static int? Max(this IEnumerable<int?> source); // // 概要: // System.Int32 値のシーケンスの最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる System.Int32 値のシーケンス。 // // 戻り値: // シーケンスの最大値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static int Max(this IEnumerable<int> source); // // 概要: // null 許容の System.Int64 値のシーケンスの最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる null 許容の System.Int64 値のシーケンス。 // // 戻り値: // シーケンスの最大値に対応する Nullable<Int64> 型 (C# の場合) または Nullable(Of Int64) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source が null です。 public static long? Max(this IEnumerable<long?> source); // // 概要: // System.Int64 値のシーケンスの最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる System.Int64 値のシーケンス。 // // 戻り値: // シーケンスの最大値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static long Max(this IEnumerable<long> source); // // 概要: // ジェネリック シーケンスの最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる値のシーケンス。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最大値。 // // 例外: // System.ArgumentNullException: // source が null です。 public static TSource Max<TSource>(this IEnumerable<TSource> source); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、null 許容の System.Decimal の最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最大値に対応する Nullable<Decimal> 型 (C# の場合) または Nullable(Of Decimal) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static decimal? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal?> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、System.Decimal の最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最大値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static decimal Max<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、null 許容の System.Double の最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最大値に対応する Nullable<Double> 型 (C# の場合) または Nullable(Of Double) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static double? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、System.Double の最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最大値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static double Max<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、null 許容の System.Single の最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最大値に対応する Nullable<Single> 型 (C# の場合) または Nullable(Of Single) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static float? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, float?> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、System.Single の最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最大値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static float Max<TSource>(this IEnumerable<TSource> source, Func<TSource, float> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、null 許容の System.Int32 の最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最大値に対応する Nullable<Int32> 型 (C# の場合) または Nullable(Of Int32) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static int? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, int?> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、System.Int32 の最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最大値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static int Max<TSource>(this IEnumerable<TSource> source, Func<TSource, int> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、null 許容の System.Int64 の最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最大値に対応する Nullable<Int64> 型 (C# の場合) または Nullable(Of Int64) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static long? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, long?> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、System.Int64 の最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最大値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static long Max<TSource>(this IEnumerable<TSource> source, Func<TSource, long> selector); // // 概要: // ジェネリック シーケンスの各要素に対して変換関数を呼び出し、結果の最大値を返します。 // // パラメータ: // source: // 最大値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TResult: // selector によって返される値の型。 // // 戻り値: // シーケンスの最大値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static TResult Max<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector); // // 概要: // null 許容の System.Decimal 値のシーケンスの最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる null 許容の System.Decimal 値のシーケンス。 // // 戻り値: // シーケンスの最小値に対応する Nullable<Decimal> 型 (C# の場合) または Nullable(Of Decimal) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source が null です。 public static decimal? Min(this IEnumerable<decimal?> source); // // 概要: // System.Decimal 値のシーケンスの最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる System.Decimal 値のシーケンス。 // // 戻り値: // シーケンスの最小値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static decimal Min(this IEnumerable<decimal> source); // // 概要: // null 許容の System.Double 値のシーケンスの最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる null 許容の System.Double 値のシーケンス。 // // 戻り値: // シーケンスの最小値に対応する Nullable<Double> 型 (C# の場合) または Nullable(Of Double) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source が null です。 public static double? Min(this IEnumerable<double?> source); // // 概要: // System.Double 値のシーケンスの最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる System.Double 値のシーケンス。 // // 戻り値: // シーケンスの最小値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static double Min(this IEnumerable<double> source); // // 概要: // null 許容の System.Single 値のシーケンスの最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる null 許容の System.Single 値のシーケンス。 // // 戻り値: // シーケンスの最小値に対応する Nullable<Single> 型 (C# の場合) または Nullable(Of Single) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source が null です。 public static float? Min(this IEnumerable<float?> source); // // 概要: // System.Single 値のシーケンスの最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる System.Single 値のシーケンス。 // // 戻り値: // シーケンスの最小値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static float Min(this IEnumerable<float> source); // // 概要: // null 許容の System.Int32 値のシーケンスの最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる null 許容の System.Int32 値のシーケンス。 // // 戻り値: // シーケンスの最小値に対応する Nullable<Int32> 型 (C# の場合) または Nullable(Of Int32) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source が null です。 public static int? Min(this IEnumerable<int?> source); // // 概要: // System.Int32 値のシーケンスの最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる System.Int32 値のシーケンス。 // // 戻り値: // シーケンスの最小値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static int Min(this IEnumerable<int> source); // // 概要: // null 許容の System.Int64 値のシーケンスの最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる null 許容の System.Int64 値のシーケンス。 // // 戻り値: // シーケンスの最小値に対応する Nullable<Int64> 型 (C# の場合) または Nullable(Of Int64) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source が null です。 public static long? Min(this IEnumerable<long?> source); // // 概要: // System.Int64 値のシーケンスの最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる System.Int64 値のシーケンス。 // // 戻り値: // シーケンスの最小値。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static long Min(this IEnumerable<long> source); // // 概要: // ジェネリック シーケンスの最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる値のシーケンス。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最小値。 // // 例外: // System.ArgumentNullException: // source が null です。 public static TSource Min<TSource>(this IEnumerable<TSource> source); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、null 許容の System.Decimal の最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最小値に対応する Nullable<Decimal> 型 (C# の場合) または Nullable(Of Decimal) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static decimal? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal?> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、System.Decimal の最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最小値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static decimal Min<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、null 許容の System.Double の最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最小値に対応する Nullable<Double> 型 (C# の場合) または Nullable(Of Double) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static double? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、System.Double の最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最小値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static double Min<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、null 許容の System.Single の最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最小値に対応する Nullable<Single> 型 (C# の場合) または Nullable(Of Single) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static float? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, float?> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、System.Single の最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最小値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static float Min<TSource>(this IEnumerable<TSource> source, Func<TSource, float> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、null 許容の System.Int32 の最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最小値に対応する Nullable<Int32> 型 (C# の場合) または Nullable(Of Int32) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static int? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, int?> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、System.Int32 の最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最小値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static int Min<TSource>(this IEnumerable<TSource> source, Func<TSource, int> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、null 許容の System.Int64 の最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最小値に対応する Nullable<Int64> 型 (C# の場合) または Nullable(Of Int64) 型 (Visual // Basic の場合) の値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static long? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, long?> selector); // // 概要: // シーケンスの各要素に対して変換関数を呼び出し、System.Int64 の最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // シーケンスの最小値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.InvalidOperationException: // source に要素が含まれていません。 public static long Min<TSource>(this IEnumerable<TSource> source, Func<TSource, long> selector); // // 概要: // ジェネリック シーケンスの各要素に対して変換関数を呼び出し、結果の最小値を返します。 // // パラメータ: // source: // 最小値を確認する対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TResult: // selector によって返される値の型。 // // 戻り値: // シーケンスの最小値。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static TResult Min<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector); // // 概要: // 指定された型に基づいて System.Collections.IEnumerable の要素をフィルタ処理します。 // // パラメータ: // source: // フィルタ処理する要素を含む System.Collections.IEnumerable。 // // 型パラメータ: // TResult: // シーケンスの要素をフィルタ処理する型。 // // 戻り値: // TResult 型の入力シーケンスの要素を格納する System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source が null です。 public static IEnumerable<TResult> OfType<TResult>(this IEnumerable source); // // 概要: // シーケンスの要素をキーに従って昇順に並べ替えます。 // // パラメータ: // source: // 順序付ける値のシーケンス。 // // keySelector: // 要素からキーを抽出する関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // 戻り値: // 要素がキーに従って並べ替えられている System.Linq.IOrderedEnumerable<TElement>。 // // 例外: // System.ArgumentNullException: // source または keySelector が null です。 public static IOrderedEnumerable<TSource> OrderBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector); // // 概要: // 指定された比較演算子を使用してシーケンスの要素を昇順に並べ替えます。 // // パラメータ: // source: // 順序付ける値のシーケンス。 // // keySelector: // 要素からキーを抽出する関数。 // // comparer: // キーを比較する System.Collections.Generic.IComparer<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // 戻り値: // 要素がキーに従って並べ替えられている System.Linq.IOrderedEnumerable<TElement>。 // // 例外: // System.ArgumentNullException: // source または keySelector が null です。 public static IOrderedEnumerable<TSource> OrderBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer); // // 概要: // シーケンスの要素をキーに従って降順に並べ替えます。 // // パラメータ: // source: // 順序付ける値のシーケンス。 // // keySelector: // 要素からキーを抽出する関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // 戻り値: // 要素がキーに従って降順に並べ替えられている System.Linq.IOrderedEnumerable<TElement>。 // // 例外: // System.ArgumentNullException: // source または keySelector が null です。 public static IOrderedEnumerable<TSource> OrderByDescending<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector); // // 概要: // 指定された比較演算子を使用してシーケンスの要素を降順に並べ替えます。 // // パラメータ: // source: // 順序付ける値のシーケンス。 // // keySelector: // 要素からキーを抽出する関数。 // // comparer: // キーを比較する System.Collections.Generic.IComparer<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // 戻り値: // 要素がキーに従って降順に並べ替えられている System.Linq.IOrderedEnumerable<TElement>。 // // 例外: // System.ArgumentNullException: // source または keySelector が null です。 public static IOrderedEnumerable<TSource> OrderByDescending<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer); // // 概要: // 指定した範囲内の整数のシーケンスを生成します。 // // パラメータ: // start: // シーケンス内の最初の整数の値。 // // count: // 生成する連続した整数の数。 // // 戻り値: // 連続した整数の範囲を含む IEnumerable<Int32> (C# の場合) または IEnumerable(Of Int32) (Visual // Basic の場合)。 // // 例外: // System.ArgumentOutOfRangeException: // count が 0 未満です。 または start + count -1 が System.Int32.MaxValue を超えています。 public static IEnumerable<int> Range(int start, int count); // // 概要: // 繰り返される 1 つの値を含むシーケンスを生成します。 // // パラメータ: // element: // 繰り返される値。 // // count: // 生成されたシーケンスで値を繰り返す回数。 // // 型パラメータ: // TResult: // 結果のシーケンスで繰り返される値の型。 // // 戻り値: // 繰り返される値を含む System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentOutOfRangeException: // count が 0 未満です。 public static IEnumerable<TResult> Repeat<TResult>(TResult element, int count); // // 概要: // シーケンスの要素の順序を反転させます。 // // パラメータ: // source: // 反転させる値のシーケンス。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 要素が入力シーケンスの要素に逆順で対応しているシーケンス。 // // 例外: // System.ArgumentNullException: // source が null です。 public static IEnumerable<TSource> Reverse<TSource>(this IEnumerable<TSource> source); // // 概要: // 要素のインデックスを組み込むことにより、シーケンスの各要素を新しいフォームに射影します。 // // パラメータ: // source: // 変換関数を呼び出す対象となる値のシーケンス。 // // selector: // 各ソース要素に適用する変換関数。この関数の 2 つ目のパラメータは、ソース要素のインデックスを表します。 // // 型パラメータ: // TSource: // source の要素の型。 // // TResult: // selector によって返される値の型。 // // 戻り値: // source の各要素に対して変換関数を呼び出した結果として得られる要素を含む System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static IEnumerable<TResult> Select<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, int, TResult> selector); // // 概要: // シーケンスの各要素を新しいフォームに射影します。 // // パラメータ: // source: // 変換関数を呼び出す対象となる値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TResult: // selector によって返される値の型。 // // 戻り値: // source の各要素に対して変換関数を呼び出した結果として得られる要素を含む System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static IEnumerable<TResult> Select<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector); // // 概要: // シーケンスの各要素を System.Collections.Generic.IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化します。 // // パラメータ: // source: // 射影する値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TResult: // selector によって返されるシーケンスの要素の型。 // // 戻り値: // 入力シーケンスの各要素に対して一対多の変換関数を呼び出した結果として得られる要素を含む System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static IEnumerable<TResult> SelectMany<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, IEnumerable<TResult>> selector); // // 概要: // シーケンスの各要素を System.Collections.Generic.IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化します。各ソース要素のインデックスは、その要素の射影されたフォームで使用されます。 // // パラメータ: // source: // 射影する値のシーケンス。 // // selector: // 各ソース要素に適用する変換関数。この関数の 2 つ目のパラメータは、ソース要素のインデックスを表します。 // // 型パラメータ: // TSource: // source の要素の型。 // // TResult: // selector によって返されるシーケンスの要素の型。 // // 戻り値: // 入力シーケンスの各要素に対して一対多の変換関数を呼び出した結果として得られる要素を含む System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static IEnumerable<TResult> SelectMany<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, int, IEnumerable<TResult>> selector); // // 概要: // シーケンスの各要素を System.Collections.Generic.IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化して、その各要素に対して結果のセレクタ関数を呼び出します。 // // パラメータ: // source: // 射影する値のシーケンス。 // // collectionSelector: // 入力シーケンスの各要素に適用する変換関数。 // // resultSelector: // 中間シーケンスの各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TCollection: // collectionSelector によって収集される中間要素の型。 // // TResult: // 結果のシーケンスの要素の型。 // // 戻り値: // source の各要素で一対多の変換関数 collectionSelector を呼び出し、こうしたシーケンスの各要素とそれに対応するソース要素を結果の要素に割り当てた結果として得られる要素を含む // System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source、collectionSelector、または resultSelector が null です。 public static IEnumerable<TResult> SelectMany<TSource, TCollection, TResult>(this IEnumerable<TSource> source, Func<TSource, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector); // // 概要: // シーケンスの各要素を System.Collections.Generic.IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化して、その各要素に対して結果のセレクタ関数を呼び出します。各ソース要素のインデックスは、その要素の中間の射影されたフォームで使用されます。 // // パラメータ: // source: // 射影する値のシーケンス。 // // collectionSelector: // 各ソース要素に適用する変換関数。この関数の 2 つ目のパラメータは、ソース要素のインデックスを表します。 // // resultSelector: // 中間シーケンスの各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TCollection: // collectionSelector によって収集される中間要素の型。 // // TResult: // 結果のシーケンスの要素の型。 // // 戻り値: // source の各要素で一対多の変換関数 collectionSelector を呼び出し、こうしたシーケンスの各要素とそれに対応するソース要素を結果の要素に割り当てた結果として得られる要素を含む // System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source、collectionSelector、または resultSelector が null です。 public static IEnumerable<TResult> SelectMany<TSource, TCollection, TResult>(this IEnumerable<TSource> source, Func<TSource, int, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector); // // 概要: // 要素の型に対して既定の等値比較演算子を使用して要素を比較することで、2 つのシーケンスが等しいかどうかを判断します。 // // パラメータ: // first: // second と比較する System.Collections.Generic.IEnumerable<T>。 // // second: // 最初のシーケンスと比較する System.Collections.Generic.IEnumerable<T>。 // // 型パラメータ: // TSource: // 入力シーケンスの要素の型。 // // 戻り値: // 2 つのソース シーケンスが同じ長さで、それらに対応する要素がその型の既定の等値比較演算子に従って等しい場合は true。それ以外の場合は false。 // // 例外: // System.ArgumentNullException: // first または second が null です。 public static bool SequenceEqual<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second); // // 概要: // 指定された System.Collections.Generic.IEqualityComparer<T> を使用して要素を比較することで、2 つのシーケンスが等しいかどうかを判断します。 // // パラメータ: // first: // second と比較する System.Collections.Generic.IEnumerable<T>。 // // second: // 最初のシーケンスと比較する System.Collections.Generic.IEnumerable<T>。 // // comparer: // 要素の比較に使用する System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TSource: // 入力シーケンスの要素の型。 // // 戻り値: // 2 つのソース シーケンスが同じ長さで、comparer に従ってそれらに対応する要素が等しい場合は true。それ以外の場合は false。 // // 例外: // System.ArgumentNullException: // first または second が null です。 public static bool SequenceEqual<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer); // // 概要: // シーケンスの唯一の要素を返します。シーケンス内の要素が 1 つだけではない場合は、例外をスローします。 // // パラメータ: // source: // 1 つの要素を返す System.Collections.Generic.IEnumerable<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 入力シーケンスの 1 つの要素。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // 入力シーケンスに複数の要素が含まれています。 または 入力シーケンスが空です。 public static TSource Single<TSource>(this IEnumerable<TSource> source); // // 概要: // 指定された条件を満たす、シーケンスの唯一の要素を返します。そのような要素が複数存在する場合は、例外をスローします。 // // パラメータ: // source: // 1 つの要素を返す System.Collections.Generic.IEnumerable<T>。 // // predicate: // 要素が条件を満たしているかどうかをテストする関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 条件を満たす、入力シーケンスの 1 つの要素。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 // // System.InvalidOperationException: // predicate の条件を満たす要素がありません。 または predicate の条件を満たす要素が複数あります。 または ソース シーケンスが空です。 public static TSource Single<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate); // // 概要: // シーケンスの唯一の要素を返します。シーケンスが空の場合、既定値を返します。シーケンス内に要素が複数ある場合、このメソッドは例外をスローします。 // // パラメータ: // source: // 1 つの要素を返す System.Collections.Generic.IEnumerable<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 入力シーケンスの 1 つの要素。シーケンスに要素が含まれない場合は default (TSource)。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.InvalidOperationException: // 入力シーケンスに複数の要素が含まれています。 public static TSource SingleOrDefault<TSource>(this IEnumerable<TSource> source); // // 概要: // 指定された条件を満たす、シーケンスの唯一の要素を返します。そのような要素が存在しない場合、既定値を返します。複数の要素が条件を満たす場合、このメソッドは例外をスローします。 // // パラメータ: // source: // 1 つの要素を返す System.Collections.Generic.IEnumerable<T>。 // // predicate: // 要素が条件を満たしているかどうかをテストする関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 条件を満たす、入力シーケンスの 1 つの要素。そのような要素が見つからない場合は default (TSource)。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 // // System.InvalidOperationException: // predicate の条件を満たす要素が複数あります。 public static TSource SingleOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate); // // 概要: // シーケンス内の指定された数の要素をバイパスし、残りの要素を返します。 // // パラメータ: // source: // 返される要素が含まれる System.Collections.Generic.IEnumerable<T>。 // // count: // 残りの要素を返す前にスキップする要素の数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 入力シーケンスで指定されたインデックスの後に出現する要素を含む System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source が null です。 public static IEnumerable<TSource> Skip<TSource>(this IEnumerable<TSource> source, int count); // // 概要: // 指定された条件が満たされる限り、シーケンスの要素をバイパスした後、残りの要素を返します。 // // パラメータ: // source: // 返される要素が含まれる System.Collections.Generic.IEnumerable<T>。 // // predicate: // 各要素が条件を満たしているかどうかをテストする関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // predicate で指定されたテストに合格しない連続する最初の要素から入力シーケンスの要素を含む System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 public static IEnumerable<TSource> SkipWhile<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate); // // 概要: // 指定された条件が満たされる限り、シーケンスの要素をバイパスした後、残りの要素を返します。要素のインデックスは、述語関数のロジックで使用されます。 // // パラメータ: // source: // 返される要素が含まれる System.Collections.Generic.IEnumerable<T>。 // // predicate: // 各ソース要素が条件に当てはまるかどうかをテストする関数。この関数の 2 つ目のパラメータは、ソース要素のインデックスを表します。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // predicate で指定されたテストに合格しない連続する最初の要素から入力シーケンスの要素を含む System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 public static IEnumerable<TSource> SkipWhile<TSource>(this IEnumerable<TSource> source, Func<TSource, int, bool> predicate); // // 概要: // null 許容の System.Decimal 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計を計算する対象となる null 許容の System.Decimal 値のシーケンス。 // // 戻り値: // シーケンスの値の合計。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.OverflowException: // 合計が System.Decimal.MaxValue を超えています。 public static decimal? Sum(this IEnumerable<decimal?> source); // // 概要: // System.Decimal 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計を計算する対象となる System.Decimal 値のシーケンス。 // // 戻り値: // シーケンスの値の合計。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.OverflowException: // 合計が System.Decimal.MaxValue を超えています。 public static decimal Sum(this IEnumerable<decimal> source); // // 概要: // null 許容の System.Double 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計を計算する対象となる null 許容の System.Double 値のシーケンス。 // // 戻り値: // シーケンスの値の合計。 // // 例外: // System.ArgumentNullException: // source が null です。 public static double? Sum(this IEnumerable<double?> source); // // 概要: // System.Double 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計を計算する対象となる System.Double 値のシーケンス。 // // 戻り値: // シーケンスの値の合計。 // // 例外: // System.ArgumentNullException: // source が null です。 public static double Sum(this IEnumerable<double> source); // // 概要: // null 許容の System.Single 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計を計算する対象となる null 許容の System.Single 値のシーケンス。 // // 戻り値: // シーケンスの値の合計。 // // 例外: // System.ArgumentNullException: // source が null です。 public static float? Sum(this IEnumerable<float?> source); // // 概要: // System.Single 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計を計算する対象となる System.Single 値のシーケンス。 // // 戻り値: // シーケンスの値の合計。 // // 例外: // System.ArgumentNullException: // source が null です。 public static float Sum(this IEnumerable<float> source); // // 概要: // null 許容の System.Int32 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計を計算する対象となる null 許容の System.Int32 値のシーケンス。 // // 戻り値: // シーケンスの値の合計。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.OverflowException: // 合計が System.Int32.MaxValue を超えています。 public static int? Sum(this IEnumerable<int?> source); // // 概要: // System.Int32 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計を計算する対象となる System.Int32 値のシーケンス。 // // 戻り値: // シーケンスの値の合計。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.OverflowException: // 合計が System.Int32.MaxValue を超えています。 public static int Sum(this IEnumerable<int> source); // // 概要: // null 許容の System.Int64 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計を計算する対象となる null 許容の System.Int64 値のシーケンス。 // // 戻り値: // シーケンスの値の合計。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.OverflowException: // 合計が System.Int64.MaxValue を超えています。 public static long? Sum(this IEnumerable<long?> source); // // 概要: // System.Int64 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計を計算する対象となる System.Int64 値のシーケンス。 // // 戻り値: // シーケンスの値の合計。 // // 例外: // System.ArgumentNullException: // source が null です。 // // System.OverflowException: // 合計が System.Int64.MaxValue を超えています。 public static long Sum(this IEnumerable<long> source); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の System.Decimal 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計の計算に使用される値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 射影された値の合計。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.OverflowException: // 合計が System.Decimal.MaxValue を超えています。 public static decimal? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal?> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する System.Decimal 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計の計算に使用される値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 射影された値の合計。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.OverflowException: // 合計が System.Decimal.MaxValue を超えています。 public static decimal Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の System.Double 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計の計算に使用される値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 射影された値の合計。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static double? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する System.Double 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計の計算に使用される値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 射影された値の合計。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static double Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の System.Single 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計の計算に使用される値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 射影された値の合計。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static float? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, float?> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する System.Single 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計の計算に使用される値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 射影された値の合計。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 public static float Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, float> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の System.Int32 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計の計算に使用される値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 射影された値の合計。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.OverflowException: // 合計が System.Int32.MaxValue を超えています。 public static int? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, int?> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する System.Int32 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計の計算に使用される値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 射影された値の合計。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.OverflowException: // 合計が System.Int32.MaxValue を超えています。 public static int Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, int> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の System.Int64 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計の計算に使用される値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 射影された値の合計。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.OverflowException: // 合計が System.Int64.MaxValue を超えています。 public static long? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, long?> selector); // // 概要: // 入力シーケンスの各要素に対して変換関数を呼び出して取得する System.Int64 値のシーケンスの合計を計算します。 // // パラメータ: // source: // 合計の計算に使用される値のシーケンス。 // // selector: // 各要素に適用する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 射影された値の合計。 // // 例外: // System.ArgumentNullException: // source または selector が null です。 // // System.OverflowException: // 合計が System.Int64.MaxValue を超えています。 public static long Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, long> selector); // // 概要: // シーケンスの先頭から、指定された数の連続する要素を返します。 // // パラメータ: // source: // 要素を返すシーケンス。 // // count: // 返す要素数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 入力シーケンスの先頭から、指定された数の要素を含む System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source が null です。 public static IEnumerable<TSource> Take<TSource>(this IEnumerable<TSource> source, int count); // // 概要: // 指定された条件が満たされる限り、シーケンスから要素を返します。 // // パラメータ: // source: // 要素を返すシーケンス。 // // predicate: // 各要素が条件を満たしているかどうかをテストする関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // テストに合格しなくなった要素の前に出現する、入力シーケンスの要素を含む System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 public static IEnumerable<TSource> TakeWhile<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate); // // 概要: // 指定された条件が満たされる限り、シーケンスから要素を返します。要素のインデックスは、述語関数のロジックで使用されます。 // // パラメータ: // source: // 要素を返すシーケンス。 // // predicate: // 各ソース要素が条件に当てはまるかどうかをテストする関数。この関数の 2 つ目のパラメータは、ソース要素のインデックスを表します。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // テストに合格しなくなった要素の前に出現する、入力シーケンスの要素を含む System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 public static IEnumerable<TSource> TakeWhile<TSource>(this IEnumerable<TSource> source, Func<TSource, int, bool> predicate); // // 概要: // キーに従って、シーケンス内の後続の要素を昇順で配置します。 // // パラメータ: // source: // 並べ替える要素を格納している System.Linq.IOrderedEnumerable<TElement>。 // // keySelector: // 各要素からキーを抽出する関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // 戻り値: // 要素がキーに従って並べ替えられている System.Linq.IOrderedEnumerable<TElement>。 // // 例外: // System.ArgumentNullException: // source または keySelector が null です。 public static IOrderedEnumerable<TSource> ThenBy<TSource, TKey>(this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector); // // 概要: // 指定された比較演算子を使用して、シーケンス内の後続の要素を昇順で配置します。 // // パラメータ: // source: // 並べ替える要素を格納している System.Linq.IOrderedEnumerable<TElement>。 // // keySelector: // 各要素からキーを抽出する関数。 // // comparer: // キーを比較する System.Collections.Generic.IComparer<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // 戻り値: // 要素がキーに従って並べ替えられている System.Linq.IOrderedEnumerable<TElement>。 // // 例外: // System.ArgumentNullException: // source または keySelector が null です。 public static IOrderedEnumerable<TSource> ThenBy<TSource, TKey>(this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer); // // 概要: // キーに従って、シーケンス内の後続の要素を降順で配置します。 // // パラメータ: // source: // 並べ替える要素を格納している System.Linq.IOrderedEnumerable<TElement>。 // // keySelector: // 各要素からキーを抽出する関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // 戻り値: // 要素がキーに従って降順に並べ替えられている System.Linq.IOrderedEnumerable<TElement>。 // // 例外: // System.ArgumentNullException: // source または keySelector が null です。 public static IOrderedEnumerable<TSource> ThenByDescending<TSource, TKey>(this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector); // // 概要: // 指定された比較演算子を使用して、シーケンス内の後続の要素を降順で配置します。 // // パラメータ: // source: // 並べ替える要素を格納している System.Linq.IOrderedEnumerable<TElement>。 // // keySelector: // 各要素からキーを抽出する関数。 // // comparer: // キーを比較する System.Collections.Generic.IComparer<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // 戻り値: // 要素がキーに従って降順に並べ替えられている System.Linq.IOrderedEnumerable<TElement>。 // // 例外: // System.ArgumentNullException: // source または keySelector が null です。 public static IOrderedEnumerable<TSource> ThenByDescending<TSource, TKey>(this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer); // // 概要: // System.Collections.Generic.IEnumerable<T> から配列を作成します。 // // パラメータ: // source: // 配列の作成元の System.Collections.Generic.IEnumerable<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 入力シーケンスの要素を含む配列。 // // 例外: // System.ArgumentNullException: // source が null です。 public static TSource[] ToArray<TSource>(this IEnumerable<TSource> source); // // 概要: // 指定されたキー セレクタ関数に従って、System.Collections.Generic.IEnumerable<T> から System.Collections.Generic.Dictionary<TKey,TValue> // を作成します。 // // パラメータ: // source: // System.Collections.Generic.Dictionary<TKey,TValue> の作成元の System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素からキーを抽出する関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // 戻り値: // キーと値を格納している System.Collections.Generic.Dictionary<TKey,TValue>。 // // 例外: // System.ArgumentNullException: // source または keySelector が null です。 または keySelector が null のキーを生成しています。 // // System.ArgumentException: // keySelector が 2 つの要素に対して重複するキーを生成しています。 public static Dictionary<TKey, TSource> ToDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector); // // 概要: // 指定されたキー セレクタ関数および要素セレクタ関数に従って、System.Collections.Generic.IEnumerable<T> から // System.Collections.Generic.Dictionary<TKey,TValue> を作成します。 // // パラメータ: // source: // System.Collections.Generic.Dictionary<TKey,TValue> の作成元の System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素からキーを抽出する関数。 // // elementSelector: // 各要素から結果の要素値を生成する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // TElement: // elementSelector によって返される値の型。 // // 戻り値: // 入力シーケンスから選択された TElement 型の値を格納する System.Collections.Generic.Dictionary<TKey,TValue>。 // // 例外: // System.ArgumentNullException: // source、keySelector、または elementSelector が null です。 または keySelector が null // のキーを生成しています。 // // System.ArgumentException: // keySelector が 2 つの要素に対して重複するキーを生成しています。 public static Dictionary<TKey, TElement> ToDictionary<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector); // // 概要: // 指定されたキー セレクタ関数およびキーの比較演算子に従って、System.Collections.Generic.IEnumerable<T> から // System.Collections.Generic.Dictionary<TKey,TValue> を作成します。 // // パラメータ: // source: // System.Collections.Generic.Dictionary<TKey,TValue> の作成元の System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素からキーを抽出する関数。 // // comparer: // キーを比較する System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // 戻り値: // キーと値を格納している System.Collections.Generic.Dictionary<TKey,TValue>。 // // 例外: // System.ArgumentNullException: // source または keySelector が null です。 または keySelector が null のキーを生成しています。 // // System.ArgumentException: // keySelector が 2 つの要素に対して重複するキーを生成しています。 public static Dictionary<TKey, TSource> ToDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer); // // 概要: // 指定されたキー セレクタ関数、比較演算子、および要素セレクタ関数に従って、System.Collections.Generic.IEnumerable<T> // から System.Collections.Generic.Dictionary<TKey,TValue> を作成します。 // // パラメータ: // source: // System.Collections.Generic.Dictionary<TKey,TValue> の作成元の System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素からキーを抽出する関数。 // // elementSelector: // 各要素から結果の要素値を生成する変換関数。 // // comparer: // キーを比較する System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // TElement: // elementSelector によって返される値の型。 // // 戻り値: // 入力シーケンスから選択された TElement 型の値を格納する System.Collections.Generic.Dictionary<TKey,TValue>。 // // 例外: // System.ArgumentNullException: // source、keySelector、または elementSelector が null です。 または keySelector が null // のキーを生成しています。 // // System.ArgumentException: // keySelector が 2 つの要素に対して重複するキーを生成しています。 public static Dictionary<TKey, TElement> ToDictionary<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer); // // 概要: // System.Collections.Generic.IEnumerable<T> から System.Collections.Generic.List<T> // を作成します。 // // パラメータ: // source: // System.Collections.Generic.List<T> の作成元の System.Collections.Generic.IEnumerable<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 入力シーケンスの要素を含む System.Collections.Generic.List<T>。 // // 例外: // System.ArgumentNullException: // source が null です。 public static List<TSource> ToList<TSource>(this IEnumerable<TSource> source); // // 概要: // 指定されたキー セレクタ関数に従って、System.Collections.Generic.IEnumerable<T> から System.Linq.Lookup<TKey,TElement> // を作成します。 // // パラメータ: // source: // System.Linq.Lookup<TKey,TElement> の作成元の System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素からキーを抽出する関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // 戻り値: // キーと値を格納している System.Linq.Lookup<TKey,TElement>。 // // 例外: // System.ArgumentNullException: // source または keySelector が null です。 public static ILookup<TKey, TSource> ToLookup<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector); // // 概要: // 指定されたキー セレクタ関数および要素セレクタ関数に従って、System.Collections.Generic.IEnumerable<T> から // System.Linq.Lookup<TKey,TElement> を作成します。 // // パラメータ: // source: // System.Linq.Lookup<TKey,TElement> の作成元の System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素からキーを抽出する関数。 // // elementSelector: // 各要素から結果の要素値を生成する変換関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // TElement: // elementSelector によって返される値の型。 // // 戻り値: // 入力シーケンスから選択された TElement 型の値を格納する System.Linq.Lookup<TKey,TElement>。 // // 例外: // System.ArgumentNullException: // source、keySelector、または elementSelector が null です。 public static ILookup<TKey, TElement> ToLookup<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector); // // 概要: // 指定されたキー セレクタ関数およびキーの比較演算子に従って、System.Collections.Generic.IEnumerable<T> から // System.Linq.Lookup<TKey,TElement> を作成します。 // // パラメータ: // source: // System.Linq.Lookup<TKey,TElement> の作成元の System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素からキーを抽出する関数。 // // comparer: // キーを比較する System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // 戻り値: // キーと値を格納している System.Linq.Lookup<TKey,TElement>。 // // 例外: // System.ArgumentNullException: // source または keySelector が null です。 public static ILookup<TKey, TSource> ToLookup<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer); // // 概要: // 指定されたキー セレクタ関数、比較演算子、および要素セレクタ関数に従って、System.Collections.Generic.IEnumerable<T> // から System.Linq.Lookup<TKey,TElement> を作成します。 // // パラメータ: // source: // System.Linq.Lookup<TKey,TElement> の作成元の System.Collections.Generic.IEnumerable<T>。 // // keySelector: // 各要素からキーを抽出する関数。 // // elementSelector: // 各要素から結果の要素値を生成する変換関数。 // // comparer: // キーを比較する System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TSource: // source の要素の型。 // // TKey: // keySelector によって返されるキーの型。 // // TElement: // elementSelector によって返される値の型。 // // 戻り値: // 入力シーケンスから選択された TElement 型の値を格納する System.Linq.Lookup<TKey,TElement>。 // // 例外: // System.ArgumentNullException: // source、keySelector、または elementSelector が null です。 public static ILookup<TKey, TElement> ToLookup<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer); // // 概要: // 既定の等値比較演算子を使用して、2 つのシーケンスの和集合を生成します。 // // パラメータ: // first: // 和集合の最初のセットを形成する一意の要素を含む System.Collections.Generic.IEnumerable<T>。 // // second: // 和集合の 2 番目のセットを形成する一意の要素を含む System.Collections.Generic.IEnumerable<T>。 // // 型パラメータ: // TSource: // 入力シーケンスの要素の型。 // // 戻り値: // 2 つの入力シーケンスの要素 (重複する要素は除く) を格納している System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // first または second が null です。 public static IEnumerable<TSource> Union<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second); // // 概要: // 指定された System.Collections.Generic.IEqualityComparer<T> を使用して 2 つのシーケンスの和集合を生成します。 // // パラメータ: // first: // 和集合の最初のセットを形成する一意の要素を含む System.Collections.Generic.IEnumerable<T>。 // // second: // 和集合の 2 番目のセットを形成する一意の要素を含む System.Collections.Generic.IEnumerable<T>。 // // comparer: // 値を比較する System.Collections.Generic.IEqualityComparer<T>。 // // 型パラメータ: // TSource: // 入力シーケンスの要素の型。 // // 戻り値: // 2 つの入力シーケンスの要素 (重複する要素は除く) を格納している System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // first または second が null です。 public static IEnumerable<TSource> Union<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer); // // 概要: // 述語に基づいて値のシーケンスをフィルタ処理します。 // // パラメータ: // source: // フィルタ処理する System.Collections.Generic.IEnumerable<T>。 // // predicate: // 各要素が条件を満たしているかどうかをテストする関数。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 条件を満たす、入力シーケンスの要素を含む System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 public static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate); // // 概要: // 述語に基づいて値のシーケンスをフィルタ処理します。各要素のインデックスは、述語関数のロジックで使用されます。 // // パラメータ: // source: // フィルタ処理する System.Collections.Generic.IEnumerable<T>。 // // predicate: // 各ソース要素が条件に当てはまるかどうかをテストする関数。この関数の 2 つ目のパラメータは、ソース要素のインデックスを表します。 // // 型パラメータ: // TSource: // source の要素の型。 // // 戻り値: // 条件を満たす、入力シーケンスの要素を含む System.Collections.Generic.IEnumerable<T>。 // // 例外: // System.ArgumentNullException: // source または predicate が null です。 public static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> source, Func<TSource, int, bool> predicate); } }