IEnumerable<T> インターフェイス
定義
指定した型のコレクションに対する単純な反復処理をサポートする列挙子を公開します。Exposes the enumerator, which supports a simple iteration over a collection of a specified type.
generic <typename T>
public interface class IEnumerable : System::Collections::IEnumerable
public interface IEnumerable<out T> : System.Collections.IEnumerable
public interface IEnumerable<T> : System.Collections.IEnumerable
type seq<'T> = interface
interface IEnumerable
Public Interface IEnumerable(Of Out T)
Implements IEnumerable
Public Interface IEnumerable(Of T)
Implements IEnumerable
型パラメーター
- T
列挙するオブジェクトの型。The type of objects to enumerate.
この型パラメーターは共変です。 つまり、指定した型、または強い派生型のいずれかを使用することができます。 共変性および反変性の詳細については、「ジェネリックの共変性と反変性」をご覧ください。- 派生
- 実装
例
次の例は、インターフェイスを実装する方法 IEnumerable<T> と、その実装を使用して LINQ クエリを作成する方法を示しています。The following example demonstrates how to implement the IEnumerable<T> interface and how to use that implementation to create a LINQ query. を実装する場合 IEnumerable<T> は、またはも実装する必要があります IEnumerator<T> 。 C# の場合のみ、 yield キーワードを使用できます。When you implement IEnumerable<T>, you must also implement IEnumerator<T> or, for C# only, you can use the yield keyword. を実装する IEnumerator<T> 必要もあり IDisposable ます。この例では、を実装します。Implementing IEnumerator<T> also requires IDisposable to be implemented, which you will see in this example.
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class App
{
// Excercise the Iterator and show that it's more
// performant.
public static void Main()
{
TestStreamReaderEnumerable();
Console.WriteLine("---");
TestReadingFile();
}
public static void TestStreamReaderEnumerable()
{
// Check the memory before the iterator is used.
long memoryBefore = GC.GetTotalMemory(true);
IEnumerable<String> stringsFound;
// Open a file with the StreamReaderEnumerable and check for a string.
try {
stringsFound =
from line in new StreamReaderEnumerable(@"c:\temp\tempFile.txt")
where line.Contains("string to search for")
select line;
Console.WriteLine("Found: " + stringsFound.Count());
}
catch (FileNotFoundException) {
Console.WriteLine(@"This example requires a file named C:\temp\tempFile.txt.");
return;
}
// Check the memory after the iterator and output it to the console.
long memoryAfter = GC.GetTotalMemory(false);
Console.WriteLine("Memory Used With Iterator = \t"
+ string.Format(((memoryAfter - memoryBefore) / 1000).ToString(), "n") + "kb");
}
public static void TestReadingFile()
{
long memoryBefore = GC.GetTotalMemory(true);
StreamReader sr;
try {
sr = File.OpenText("c:\\temp\\tempFile.txt");
}
catch (FileNotFoundException) {
Console.WriteLine(@"This example requires a file named C:\temp\tempFile.txt.");
return;
}
// Add the file contents to a generic list of strings.
List<string> fileContents = new List<string>();
while (!sr.EndOfStream) {
fileContents.Add(sr.ReadLine());
}
// Check for the string.
var stringsFound =
from line in fileContents
where line.Contains("string to search for")
select line;
sr.Close();
Console.WriteLine("Found: " + stringsFound.Count());
// Check the memory after when the iterator is not used, and output it to the console.
long memoryAfter = GC.GetTotalMemory(false);
Console.WriteLine("Memory Used Without Iterator = \t" +
string.Format(((memoryAfter - memoryBefore) / 1000).ToString(), "n") + "kb");
}
}
// A custom class that implements IEnumerable(T). When you implement IEnumerable(T),
// you must also implement IEnumerable and IEnumerator(T).
public class StreamReaderEnumerable : IEnumerable<string>
{
private string _filePath;
public StreamReaderEnumerable(string filePath)
{
_filePath = filePath;
}
// Must implement GetEnumerator, which returns a new StreamReaderEnumerator.
public IEnumerator<string> GetEnumerator()
{
return new StreamReaderEnumerator(_filePath);
}
// Must also implement IEnumerable.GetEnumerator, but implement as a private method.
private IEnumerator GetEnumerator1()
{
return this.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator1();
}
}
// When you implement IEnumerable(T), you must also implement IEnumerator(T),
// which will walk through the contents of the file one line at a time.
// Implementing IEnumerator(T) requires that you implement IEnumerator and IDisposable.
public class StreamReaderEnumerator : IEnumerator<string>
{
private StreamReader _sr;
public StreamReaderEnumerator(string filePath)
{
_sr = new StreamReader(filePath);
}
private string _current;
// Implement the IEnumerator(T).Current publicly, but implement
// IEnumerator.Current, which is also required, privately.
public string Current
{
get
{
if (_sr == null || _current == null)
{
throw new InvalidOperationException();
}
return _current;
}
}
private object Current1
{
get { return this.Current; }
}
object IEnumerator.Current
{
get { return Current1; }
}
// Implement MoveNext and Reset, which are required by IEnumerator.
public bool MoveNext()
{
_current = _sr.ReadLine();
if (_current == null)
return false;
return true;
}
public void Reset()
{
_sr.DiscardBufferedData();
_sr.BaseStream.Seek(0, SeekOrigin.Begin);
_current = null;
}
// Implement IDisposable, which is also implemented by IEnumerator(T).
private bool disposedValue = false;
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (!this.disposedValue)
{
if (disposing)
{
// Dispose of managed resources.
}
_current = null;
if (_sr != null) {
_sr.Close();
_sr.Dispose();
}
}
this.disposedValue = true;
}
~StreamReaderEnumerator()
{
Dispose(false);
}
}
// This example displays output similar to the following:
// Found: 2
// Memory Used With Iterator = 33kb
// ---
// Found: 2
// Memory Used Without Iterator = 206kb
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Linq
Public Module App
' Excercise the Iterator and show that it's more performant.
Public Sub Main()
TestStreamReaderEnumerable()
Console.WriteLine("---")
TestReadingFile()
End Sub
Public Sub TestStreamReaderEnumerable()
' Check the memory before the iterator is used.
Dim memoryBefore As Long = GC.GetTotalMemory(true)
Dim stringsFound As IEnumerable(Of String)
' Open a file with the StreamReaderEnumerable and check for a string.
Try
stringsFound =
from line in new StreamReaderEnumerable("c:\temp\tempFile.txt")
where line.Contains("string to search for")
select line
Console.WriteLine("Found: {0}", stringsFound.Count())
Catch e As FileNotFoundException
Console.WriteLine("This example requires a file named C:\temp\tempFile.txt.")
Return
End Try
' Check the memory after the iterator and output it to the console.
Dim memoryAfter As Long = GC.GetTotalMemory(false)
Console.WriteLine("Memory Used with Iterator = {1}{0} kb",
(memoryAfter - memoryBefore)\1000, vbTab)
End Sub
Public Sub TestReadingFile()
Dim memoryBefore As Long = GC.GetTotalMemory(true)
Dim sr As StreamReader
Try
sr = File.OpenText("c:\temp\tempFile.txt")
Catch e As FileNotFoundException
Console.WriteLine("This example requires a file named C:\temp\tempFile.txt.")
Return
End Try
' Add the file contents to a generic list of strings.
Dim fileContents As New List(Of String)()
Do While Not sr.EndOfStream
fileContents.Add(sr.ReadLine())
Loop
' Check for the string.
Dim stringsFound =
from line in fileContents
where line.Contains("string to search for")
select line
sr.Close()
Console.WriteLine("Found: {0}", stringsFound.Count())
' Check the memory after when the iterator is not used, and output it to the console.
Dim memoryAfter As Long = GC.GetTotalMemory(False)
Console.WriteLine("Memory Used without Iterator = {1}{0} kb",
(memoryAfter - memoryBefore)\1000, vbTab)
End Sub
End Module
' A custom class that implements IEnumerable(T). When you implement IEnumerable(T),
' you must also implement IEnumerable and IEnumerator(T).
Public Class StreamReaderEnumerable : Implements IEnumerable(Of String)
Private _filePath As String
Public Sub New(filePath As String)
_filePath = filePath
End Sub
' Must implement GetEnumerator, which returns a new StreamReaderEnumerator.
Public Function GetEnumerator() As IEnumerator(Of String) _
Implements IEnumerable(Of String).GetEnumerator
Return New StreamReaderEnumerator(_filePath)
End Function
' Must also implement IEnumerable.GetEnumerator, but implement as a private method.
Private Function GetEnumerator1() As IEnumerator _
Implements IEnumerable.GetEnumerator
Return Me.GetEnumerator()
End Function
End Class
' When you implement IEnumerable(T), you must also implement IEnumerator(T),
' which will walk through the contents of the file one line at a time.
' Implementing IEnumerator(T) requires that you implement IEnumerator and IDisposable.
Public Class StreamReaderEnumerator : Implements IEnumerator(Of String)
Private _sr As StreamReader
Public Sub New(filePath As String)
_sr = New StreamReader(filePath)
End Sub
Private _current As String
' Implement the IEnumerator(T).Current Publicly, but implement
' IEnumerator.Current, which is also required, privately.
Public ReadOnly Property Current As String _
Implements IEnumerator(Of String).Current
Get
If _sr Is Nothing OrElse _current Is Nothing
Throw New InvalidOperationException()
End If
Return _current
End Get
End Property
Private ReadOnly Property Current1 As Object _
Implements IEnumerator.Current
Get
Return Me.Current
End Get
End Property
' Implement MoveNext and Reset, which are required by IEnumerator.
Public Function MoveNext() As Boolean _
Implements IEnumerator.MoveNext
_current = _sr.ReadLine()
if _current Is Nothing Then Return False
Return True
End Function
Public Sub Reset() _
Implements IEnumerator.Reset
_sr.DiscardBufferedData()
_sr.BaseStream.Seek(0, SeekOrigin.Begin)
_current = Nothing
End Sub
' Implement IDisposable, which is also implemented by IEnumerator(T).
Private disposedValue As Boolean = False
Public Sub Dispose() _
Implements IDisposable.Dispose
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
Protected Overridable Sub Dispose(disposing As Boolean)
If Not Me.disposedValue Then
If disposing Then
' Dispose of managed resources.
End If
_current = Nothing
If _sr IsNot Nothing Then
_sr.Close()
_sr.Dispose()
End If
End If
Me.disposedValue = True
End Sub
Protected Overrides Sub Finalize()
Dispose(False)
End Sub
End Class
' This example displays output similar to the following:
' Found: 2
' Memory Used With Iterator = 33kb
' ---
' Found: 2
' Memory Used Without Iterator = 206kb
インターフェイスを実装する方法を示す別の C# の例につい IEnumerable<T> ては、「 ジェネリックのサンプル」を参照してください。For another C# example that demonstrates how to implement the IEnumerable<T> interface, see the Generics Sample. このサンプルでは、を yield
実装する代わりに、キーワードを使用 IEnumerator<T> します。This sample uses the yield
keyword instead of implementing IEnumerator<T>.
注釈
IEnumerable<T> は System.Collections.Generic 、、などの名前空間のコレクションの基本インターフェイスで List<T> あり、 Dictionary<TKey,TValue> Stack<T> やなどの他のジェネリックコレクションです ObservableCollection<T> ConcurrentStack<T> 。IEnumerable<T> is the base interface for collections in the System.Collections.Generic namespace such as List<T>, Dictionary<TKey,TValue>, and Stack<T> and other generic collections such as ObservableCollection<T> and ConcurrentStack<T>. を実装するコレクションは IEnumerable<T> 、ステートメントを使用して列挙でき foreach
ます。Collections that implement IEnumerable<T> can be enumerated by using the foreach
statement.
このインターフェイスの非ジェネリックバージョンについては、「」を参照してください System.Collections.IEnumerable 。For the non-generic version of this interface, see System.Collections.IEnumerable.
IEnumerable<T> には、このインターフェイスを実装するときに実装する必要がある1つのメソッドが含まれています。 GetEnumerator。オブジェクトを返し IEnumerator<T> ます。IEnumerable<T> contains a single method that you must implement when implementing this interface; GetEnumerator, which returns an IEnumerator<T> object. 返されたは、 IEnumerator<T> プロパティを公開することによって、コレクションを反復処理する機能を提供し Current ます。The returned IEnumerator<T> provides the ability to iterate through the collection by exposing a Current property.
注意 (実装者)
非ジェネリックコレクションを反復処理するメソッドとの互換性を維持するために、はを IEnumerable<T> 実装 IEnumerable します。To remain compatible with methods that iterate non-generic collections, IEnumerable<T> implements IEnumerable. これにより、オブジェクトを必要とするメソッドにジェネリックコレクションを渡すことができ IEnumerable ます。This allows a generic collection to be passed to a method that expects an IEnumerable object.
メソッド
GetEnumerator() |
コレクションを反復処理する列挙子を返します。Returns an enumerator that iterates through the collection. |
拡張メソッド
ToImmutableArray<TSource>(IEnumerable<TSource>) |
指定されたコレクションから、変更できない配列を作成します。Creates an immutable array from the specified collection. |
ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
ソース キーに変換関数を適用し、変更できないディクショナリを既存の要素のコレクションから作成します。Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys. |
ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) |
シーケンスの変換に基づき、変更できないディクショナリを作成します。Constructs an immutable dictionary based on some transformation of a sequence. |
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) |
シーケンスを列挙して変換し、その内容の変更できないディクショナリを生成します。Enumerates and transforms a sequence, and produces an immutable dictionary of its contents. |
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>) |
シーケンスを列挙して変換し、指定されたキーの比較子を使用してその内容の変更できないディクショナリを生成します。Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer. |
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) |
シーケンスを列挙して変換し、指定されたキーの比較子および値の比較子を使用してその内容の変更できないディクショナリを生成します。Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers. |
ToImmutableHashSet<TSource>(IEnumerable<TSource>) |
シーケンスを列挙し、その内容の変更できないハッシュ セットを生成します。Enumerates a sequence and produces an immutable hash set of its contents. |
ToImmutableHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) |
シーケンスを列挙し、その内容の変更できないハッシュ セットを生成して、指定された等値比較子をセットの種類に使用します。Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type. |
ToImmutableList<TSource>(IEnumerable<TSource>) |
シーケンスを列挙し、その内容の変更できないリストを生成します。Enumerates a sequence and produces an immutable list of its contents. |
ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) |
シーケンスを列挙して変換し、その内容の変更できない並べ替えられたディクショナリを生成します。Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents. |
ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>) |
シーケンスを列挙して変換し、指定されたキーの比較子を使用してその内容の変更できない並べ替えられたディクショナリを生成します。Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key comparer. |
ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>, IEqualityComparer<TValue>) |
シーケンスを列挙して変換し、指定されたキーの比較子と値の比較子を使用してその内容の変更できない並べ替えられたディクショナリを生成します。Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key and value comparers. |
ToImmutableSortedSet<TSource>(IEnumerable<TSource>) |
シーケンスを列挙し、その内容の変更できない並べ替えられたセットを生成します。Enumerates a sequence and produces an immutable sorted set of its contents. |
ToImmutableSortedSet<TSource>(IEnumerable<TSource>, IComparer<TSource>) |
シーケンスを列挙し、その内容の変更できない並べ替えられたセットを生成して、指定された比較子を使用します。Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer. |
CopyToDataTable<T>(IEnumerable<T>) |
指定した入力 DataTable オブジェクトに応じて (ジェネリック パラメーター |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) |
指定した入力 DataRow オブジェクトに応じて (ジェネリック パラメーター |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) |
指定した入力 DataRow オブジェクトに応じて (ジェネリック パラメーター |
Aggregate<TSource>(IEnumerable<TSource>, Func<TSource,TSource,TSource>) |
シーケンスにアキュムレータ関数を適用します。Applies an accumulator function over a sequence. |
Aggregate<TSource,TAccumulate>(IEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>) |
シーケンスにアキュムレータ関数を適用します。Applies an accumulator function over a sequence. 指定されたシード値が最初のアキュムレータ値として使用されます。The specified seed value is used as the initial accumulator value. |
Aggregate<TSource,TAccumulate,TResult>(IEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, Func<TAccumulate,TResult>) |
シーケンスにアキュムレータ関数を適用します。Applies an accumulator function over a sequence. 指定したシード値は最初のアキュムレータ値として使用され、指定した関数は結果値の選択に使用されます。The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value. |
All<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
シーケンスのすべての要素が条件を満たしているかどうかを判断します。Determines whether all elements of a sequence satisfy a condition. |
Any<TSource>(IEnumerable<TSource>) |
シーケンスに要素が含まれているかどうかを判断します。Determines whether a sequence contains any elements. |
Any<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
シーケンスの任意の要素が条件を満たしているかどうかを判断します。Determines whether any element of a sequence satisfies a condition. |
Append<TSource>(IEnumerable<TSource>, TSource) |
シーケンスの末尾に値を追加します。Appends a value to the end of the sequence. |
AsEnumerable<TSource>(IEnumerable<TSource>) |
IEnumerable<T> として型指定された入力を返します。Returns the input typed as IEnumerable<T>. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Decimal 値のシーケンスの平均値を計算します。Computes the average of a sequence of Decimal values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Double>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Double 値のシーケンスの平均値を計算します。Computes the average of a sequence of Double values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Int32>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Int32 値のシーケンスの平均値を計算します。Computes the average of a sequence of Int32 values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Int64>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Int64 値のシーケンスの平均値を計算します。Computes the average of a sequence of Int64 values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Decimal 値のシーケンスの平均値を計算します。Computes the average of a sequence of nullable Decimal values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Double 値のシーケンスの平均値を計算します。Computes the average of a sequence of nullable Double values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Int32 値のシーケンスの平均値を計算します。Computes the average of a sequence of nullable Int32 values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Int64 値のシーケンスの平均値を計算します。Computes the average of a sequence of nullable Int64 values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Single 値のシーケンスの平均値を計算します。Computes the average of a sequence of nullable Single values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Single>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Single 値のシーケンスの平均値を計算します。Computes the average of a sequence of Single values that are obtained by invoking a transform function on each element of the input sequence. |
Cast<TResult>(IEnumerable) |
IEnumerable の要素を、指定した型にキャストします。Casts the elements of an IEnumerable to the specified type. |
Concat<TSource>(IEnumerable<TSource>, IEnumerable<TSource>) |
2 つのシーケンスを連結します。Concatenates two sequences. |
Contains<TSource>(IEnumerable<TSource>, TSource) |
既定の等値比較子を使用して、指定した要素がシーケンスに含まれているかどうかを判断します。Determines whether a sequence contains a specified element by using the default equality comparer. |
Contains<TSource>(IEnumerable<TSource>, TSource, IEqualityComparer<TSource>) |
指定した IEqualityComparer<T> を使用して、指定した要素がシーケンスに含まれているかどうかを判断します。Determines whether a sequence contains a specified element by using a specified IEqualityComparer<T>. |
Count<TSource>(IEnumerable<TSource>) |
シーケンス内の要素数を返します。Returns the number of elements in a sequence. |
Count<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
条件を満たす、指定されたシーケンス内の要素の数を表す数値を返します。Returns a number that represents how many elements in the specified sequence satisfy a condition. |
DefaultIfEmpty<TSource>(IEnumerable<TSource>) |
指定したシーケンスの要素を返します。シーケンスが空の場合はシングルトン コレクションにある型パラメーターの既定値を返します。Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty. |
DefaultIfEmpty<TSource>(IEnumerable<TSource>, TSource) |
指定されたシーケンスの要素を返します。シーケンスが空の場合はシングルトン コレクションにある型パラメーターの既定値を返します。Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty. |
Distinct<TSource>(IEnumerable<TSource>) |
既定の等値比較子を使用して値を比較することにより、シーケンスから一意の要素を返します。Returns distinct elements from a sequence by using the default equality comparer to compare values. |
Distinct<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) |
指定された IEqualityComparer<T> を使用して値を比較することにより、シーケンスから一意の要素を返します。Returns distinct elements from a sequence by using a specified IEqualityComparer<T> to compare values. |
ElementAt<TSource>(IEnumerable<TSource>, Int32) |
シーケンス内の指定されたインデックス位置にある要素を返します。Returns the element at a specified index in a sequence. |
ElementAtOrDefault<TSource>(IEnumerable<TSource>, Int32) |
シーケンス内の指定したインデックス位置にある要素を返します。インデックスが範囲外の場合は既定値を返します。Returns the element at a specified index in a sequence or a default value if the index is out of range. |
Except<TSource>(IEnumerable<TSource>, IEnumerable<TSource>) |
既定の等値比較子を使用して値を比較することにより、2 つのシーケンスの差集合を生成します。Produces the set difference of two sequences by using the default equality comparer to compare values. |
Except<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) |
指定された IEqualityComparer<T> を使用して値を比較することにより、2 つのシーケンスの差集合を生成します。Produces the set difference of two sequences by using the specified IEqualityComparer<T> to compare values. |
First<TSource>(IEnumerable<TSource>) |
シーケンスの最初の要素を返します。Returns the first element of a sequence. |
First<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
指定された条件を満たす、シーケンスの最初の要素を返します。Returns the first element in a sequence that satisfies a specified condition. |
FirstOrDefault<TSource>(IEnumerable<TSource>) |
シーケンスの最初の要素を返します。シーケンスに要素が含まれていない場合は既定値を返します。Returns the first element of a sequence, or a default value if the sequence contains no elements. |
FirstOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
条件を満たす、シーケンスの最初の要素を返します。このような要素が見つからない場合は既定値を返します。Returns the first element of the sequence that satisfies a condition or a default value if no such element is found. |
GroupBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
指定されたキー セレクター関数に従ってシーケンスの要素をグループ化します。Groups the elements of a sequence according to a specified key selector function. |
GroupBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) |
指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、指定された比較子を使用してキーを比較します。Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer. |
GroupBy<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>) |
指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、指定された関数を使用して各グループの要素を射影します。Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function. |
GroupBy<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>) |
キー セレクター関数に従ってシーケンスの要素をグループ化します。Groups the elements of a sequence according to a key selector function. キーの比較には、比較子を使用し、各グループの要素の射影には、指定された関数を使用します。The keys are compared by using a comparer and each group's elements are projected by using a specified function. |
GroupBy<TSource,TKey,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TKey,IEnumerable<TSource>,TResult>) |
指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. |
GroupBy<TSource,TKey,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TKey,IEnumerable<TSource>,TResult>, IEqualityComparer<TKey>) |
指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. キーの比較には、指定された比較子を使用します。The keys are compared by using a specified comparer. |
GroupBy<TSource,TKey,TElement,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, Func<TKey,IEnumerable<TElement>,TResult>) |
指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. 各グループの要素は、指定された関数を使用して射影されます。The elements of each group are projected by using a specified function. |
GroupBy<TSource,TKey,TElement,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, Func<TKey,IEnumerable<TElement>,TResult>, IEqualityComparer<TKey>) |
指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. キー値の比較には、指定された比較子を使用し、各グループの要素の射影には、指定された関数を使用します。Key values are compared by using a specified comparer, and the elements of each group are projected by using a specified function. |
GroupJoin<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,IEnumerable<TInner>,TResult>) |
キーが等しいかどうかに基づいて 2 つのシーケンスの要素を相互に関連付け、その結果をグループ化します。Correlates the elements of two sequences based on equality of keys and groups the results. キーの比較には既定の等値比較子が使用されます。The default equality comparer is used to compare keys. |
GroupJoin<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,IEnumerable<TInner>,TResult>, IEqualityComparer<TKey>) |
キーが等しいかどうかに基づいて 2 つのシーケンスの要素を相互に関連付け、その結果をグループ化します。Correlates the elements of two sequences based on key equality and groups the results. 指定された IEqualityComparer<T> を使用してキーを比較します。A specified IEqualityComparer<T> is used to compare keys. |
Intersect<TSource>(IEnumerable<TSource>, IEnumerable<TSource>) |
既定の等値比較子を使用して値を比較することにより、2 つのシーケンスの積集合を生成します。Produces the set intersection of two sequences by using the default equality comparer to compare values. |
Intersect<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) |
指定された IEqualityComparer<T> を使用して値を比較することにより、2 つのシーケンスの積集合を生成します。Produces the set intersection of two sequences by using the specified IEqualityComparer<T> to compare values. |
Join<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>) |
一致するキーに基づいて 2 つのシーケンスの要素を相互に関連付けます。Correlates the elements of two sequences based on matching keys. キーの比較には既定の等値比較子が使用されます。The default equality comparer is used to compare keys. |
Join<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>, IEqualityComparer<TKey>) |
一致するキーに基づいて 2 つのシーケンスの要素を相互に関連付けます。Correlates the elements of two sequences based on matching keys. 指定された IEqualityComparer<T> を使用してキーを比較します。A specified IEqualityComparer<T> is used to compare keys. |
Last<TSource>(IEnumerable<TSource>) |
シーケンスの最後の要素を返します。Returns the last element of a sequence. |
Last<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
指定された条件を満たす、シーケンスの最後の要素を返します。Returns the last element of a sequence that satisfies a specified condition. |
LastOrDefault<TSource>(IEnumerable<TSource>) |
シーケンスの最後の要素を返します。シーケンスに要素が含まれていない場合は既定値を返します。Returns the last element of a sequence, or a default value if the sequence contains no elements. |
LastOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
条件を満たす、シーケンスの最後の要素を返します。このような要素が見つからない場合は既定値を返します。Returns the last element of a sequence that satisfies a condition or a default value if no such element is found. |
LongCount<TSource>(IEnumerable<TSource>) |
シーケンス内の要素の合計数を表す Int64 を返します。Returns an Int64 that represents the total number of elements in a sequence. |
LongCount<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
シーケンス内で条件を満たす要素の数を表す Int64 を返します。Returns an Int64 that represents how many elements in a sequence satisfy a condition. |
Max<TSource>(IEnumerable<TSource>) |
ジェネリック シーケンスの最大値を返します。Returns the maximum value in a generic sequence. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>) |
シーケンスの各要素に対して変換関数を呼び出し、Decimal の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum Decimal value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Double>) |
シーケンスの各要素に対して変換関数を呼び出し、Double の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum Double value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Int32>) |
シーケンスの各要素に対して変換関数を呼び出し、Int32 の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum Int32 value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Int64>) |
シーケンスの各要素に対して変換関数を呼び出し、Int64 の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum Int64 value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Decimal の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum nullable Decimal value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Double の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum nullable Double value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Int32 の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum nullable Int32 value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Int64 の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum nullable Int64 value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Single の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum nullable Single value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Single>) |
シーケンスの各要素に対して変換関数を呼び出し、Single の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum Single value. |
Max<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>) |
ジェネリック シーケンスの各要素に対して変換関数を呼び出し、結果の最大値を返します。Invokes a transform function on each element of a generic sequence and returns the maximum resulting value. |
Min<TSource>(IEnumerable<TSource>) |
ジェネリック シーケンスの最小値を返します。Returns the minimum value in a generic sequence. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>) |
シーケンスの各要素に対して変換関数を呼び出し、Decimal の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum Decimal value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Double>) |
シーケンスの各要素に対して変換関数を呼び出し、Double の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum Double value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Int32>) |
シーケンスの各要素に対して変換関数を呼び出し、Int32 の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum Int32 value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Int64>) |
シーケンスの各要素に対して変換関数を呼び出し、Int64 の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum Int64 value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Decimal の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum nullable Decimal value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Double の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum nullable Double value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Int32 の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum nullable Int32 value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Int64 の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum nullable Int64 value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Single の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum nullable Single value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Single>) |
シーケンスの各要素に対して変換関数を呼び出し、Single の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum Single value. |
Min<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>) |
ジェネリック シーケンスの各要素に対して変換関数を呼び出し、結果の最小値を返します。Invokes a transform function on each element of a generic sequence and returns the minimum resulting value. |
OfType<TResult>(IEnumerable) |
指定された型に基づいて IEnumerable の要素をフィルター処理します。Filters the elements of an IEnumerable based on a specified type. |
OrderBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
シーケンスの要素をキーに従って昇順に並べ替えます。Sorts the elements of a sequence in ascending order according to a key. |
OrderBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>) |
指定された比較子を使用してシーケンスの要素を昇順に並べ替えます。Sorts the elements of a sequence in ascending order by using a specified comparer. |
OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
シーケンスの要素をキーに従って降順に並べ替えます。Sorts the elements of a sequence in descending order according to a key. |
OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>) |
指定された比較子を使用してシーケンスの要素を降順に並べ替えます。Sorts the elements of a sequence in descending order by using a specified comparer. |
Prepend<TSource>(IEnumerable<TSource>, TSource) |
シーケンスの先頭に値を追加します。Adds a value to the beginning of the sequence. |
Reverse<TSource>(IEnumerable<TSource>) |
シーケンスの要素の順序を反転させます。Inverts the order of the elements in a sequence. |
Select<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>) |
シーケンスの各要素を新しいフォームに射影します。Projects each element of a sequence into a new form. |
Select<TSource,TResult>(IEnumerable<TSource>, Func<TSource,Int32,TResult>) |
要素のインデックスを組み込むことにより、シーケンスの各要素を新しいフォームに射影します。Projects each element of a sequence into a new form by incorporating the element's index. |
SelectMany<TSource,TResult>(IEnumerable<TSource>, Func<TSource,IEnumerable<TResult>>) |
シーケンスの各要素を IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化します。Projects each element of a sequence to an IEnumerable<T> and flattens the resulting sequences into one sequence. |
SelectMany<TSource,TResult>(IEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TResult>>) |
シーケンスの各要素を IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化します。Projects each element of a sequence to an IEnumerable<T>, and flattens the resulting sequences into one sequence. 各ソース要素のインデックスは、その要素の射影されたフォームで使用されます。The index of each source element is used in the projected form of that element. |
SelectMany<TSource,TCollection,TResult>(IEnumerable<TSource>, Func<TSource,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>) |
シーケンスの各要素を IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化して、その各要素に対して結果のセレクター関数を呼び出します。Projects each element of a sequence to an IEnumerable<T>, flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein. |
SelectMany<TSource,TCollection,TResult>(IEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>) |
シーケンスの各要素を IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化して、その各要素に対して結果のセレクター関数を呼び出します。Projects each element of a sequence to an IEnumerable<T>, flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein. 各ソース要素のインデックスは、その要素の中間の射影されたフォームで使用されます。The index of each source element is used in the intermediate projected form of that element. |
SequenceEqual<TSource>(IEnumerable<TSource>, IEnumerable<TSource>) |
要素の型に対して既定の等値比較子を使用して要素を比較することで、2 つのシーケンスが等しいかどうかを判断します。Determines whether two sequences are equal by comparing the elements by using the default equality comparer for their type. |
SequenceEqual<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) |
指定された IEqualityComparer<T> を使用して要素を比較することで、2 つのシーケンスが等しいかどうかを判断します。Determines whether two sequences are equal by comparing their elements by using a specified IEqualityComparer<T>. |
Single<TSource>(IEnumerable<TSource>) |
シーケンスの唯一の要素を返し、シーケンス内の要素が 1 つだけでない場合は例外をスローします。Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence. |
Single<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
指定された条件を満たす、シーケンスの唯一の要素を返し、そのような要素が複数存在する場合は例外をスローします。Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists. |
SingleOrDefault<TSource>(IEnumerable<TSource>) |
シーケンスの唯一の要素を返します。シーケンスが空の場合、既定値を返します。シーケンス内に要素が複数ある場合、このメソッドは例外をスローします。Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence. |
SingleOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
指定された条件を満たすシーケンスの唯一の要素、またはそのような要素がない場合は既定値を返します。このメソッドは、複数の要素が条件を満たす場合に例外をスローします。Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition. |
Skip<TSource>(IEnumerable<TSource>, Int32) |
シーケンス内の指定された数の要素をバイパスし、残りの要素を返します。Bypasses a specified number of elements in a sequence and then returns the remaining elements. |
SkipLast<TSource>(IEnumerable<TSource>, Int32) |
|
SkipWhile<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
指定された条件が満たされる限り、シーケンスの要素をバイパスした後、残りの要素を返します。Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. |
SkipWhile<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>) |
指定された条件が満たされる限り、シーケンスの要素をバイパスした後、残りの要素を返します。Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. 要素のインデックスは、述語関数のロジックで使用されます。The element's index is used in the logic of the predicate function. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Decimal 値のシーケンスの合計を計算します。Computes the sum of the sequence of Decimal values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Double>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Double 値のシーケンスの合計を計算します。Computes the sum of the sequence of Double values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Int32>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Int32 値のシーケンスの合計を計算します。Computes the sum of the sequence of Int32 values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Int64>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Int64 値のシーケンスの合計を計算します。Computes the sum of the sequence of Int64 values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Decimal 値のシーケンスの合計を計算します。Computes the sum of the sequence of nullable Decimal values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Double 値のシーケンスの合計を計算します。Computes the sum of the sequence of nullable Double values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Int32 値のシーケンスの合計を計算します。Computes the sum of the sequence of nullable Int32 values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Int64 値のシーケンスの合計を計算します。Computes the sum of the sequence of nullable Int64 values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Single 値のシーケンスの合計を計算します。Computes the sum of the sequence of nullable Single values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Single>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Single 値のシーケンスの合計を計算します。Computes the sum of the sequence of Single values that are obtained by invoking a transform function on each element of the input sequence. |
Take<TSource>(IEnumerable<TSource>, Int32) |
シーケンスの先頭から、指定された数の連続する要素を返します。Returns a specified number of contiguous elements from the start of a sequence. |
TakeLast<TSource>(IEnumerable<TSource>, Int32) |
|
TakeWhile<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
指定された条件が満たされる限り、シーケンスから要素を返します。Returns elements from a sequence as long as a specified condition is true. |
TakeWhile<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>) |
指定された条件が満たされる限り、シーケンスから要素を返します。Returns elements from a sequence as long as a specified condition is true. 要素のインデックスは、述語関数のロジックで使用されます。The element's index is used in the logic of the predicate function. |
ToArray<TSource>(IEnumerable<TSource>) |
IEnumerable<T> から配列を作成します。Creates an array from a IEnumerable<T>. |
ToDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
指定されたキー セレクター関数に従って、Dictionary<TKey,TValue> から IEnumerable<T> を作成します。Creates a Dictionary<TKey,TValue> from an IEnumerable<T> according to a specified key selector function. |
ToDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) |
指定されたキー セレクター関数およびキーの比較子に従って、Dictionary<TKey,TValue> から IEnumerable<T> を作成します。Creates a Dictionary<TKey,TValue> from an IEnumerable<T> according to a specified key selector function and key comparer. |
ToDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>) |
指定されたキー セレクター関数および要素セレクター関数に従って、Dictionary<TKey,TValue> から IEnumerable<T> を作成します。Creates a Dictionary<TKey,TValue> from an IEnumerable<T> according to specified key selector and element selector functions. |
ToDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>) |
指定されたキー セレクター関数、比較子、および要素セレクター関数に従って、Dictionary<TKey,TValue> から IEnumerable<T> を作成します。Creates a Dictionary<TKey,TValue> from an IEnumerable<T> according to a specified key selector function, a comparer, and an element selector function. |
ToHashSet<TSource>(IEnumerable<TSource>) |
IEnumerable<T> から HashSet<T> を作成します。Creates a HashSet<T> from an IEnumerable<T>. |
ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) |
|
ToList<TSource>(IEnumerable<TSource>) |
IEnumerable<T> から List<T> を作成します。Creates a List<T> from an IEnumerable<T>. |
ToLookup<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
指定されたキー セレクター関数に従って、Lookup<TKey,TElement> から IEnumerable<T> を作成します。Creates a Lookup<TKey,TElement> from an IEnumerable<T> according to a specified key selector function. |
ToLookup<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) |
指定されたキー セレクター関数およびキーの比較子に従って、Lookup<TKey,TElement> から IEnumerable<T> を作成します。Creates a Lookup<TKey,TElement> from an IEnumerable<T> according to a specified key selector function and key comparer. |
ToLookup<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>) |
指定されたキー セレクター関数および要素セレクター関数に従って、Lookup<TKey,TElement> から IEnumerable<T> を作成します。Creates a Lookup<TKey,TElement> from an IEnumerable<T> according to specified key selector and element selector functions. |
ToLookup<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>) |
指定されたキー セレクター関数、比較子、および要素セレクター関数に従って、Lookup<TKey,TElement> から IEnumerable<T> を作成します。Creates a Lookup<TKey,TElement> from an IEnumerable<T> according to a specified key selector function, a comparer and an element selector function. |
Union<TSource>(IEnumerable<TSource>, IEnumerable<TSource>) |
既定の等値比較子を使用して、2 つのシーケンスの和集合を生成します。Produces the set union of two sequences by using the default equality comparer. |
Union<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) |
指定された IEqualityComparer<T> を使用して 2 つのシーケンスの和集合を生成します。Produces the set union of two sequences by using a specified IEqualityComparer<T>. |
Where<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
述語に基づいて値のシーケンスをフィルター処理します。Filters a sequence of values based on a predicate. |
Where<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>) |
述語に基づいて値のシーケンスをフィルター処理します。Filters a sequence of values based on a predicate. 各要素のインデックスは、述語関数のロジックで使用されます。Each element's index is used in the logic of the predicate function. |
Zip<TFirst,TSecond>(IEnumerable<TFirst>, IEnumerable<TSecond>) |
指定された 2 つのシーケンスの要素を持つタプルのシーケンスを生成します。Produces a sequence of tuples with elements from the two specified sequences. |
Zip<TFirst,TSecond,TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst,TSecond,TResult>) |
2 つのシーケンスの対応する要素に対して、1 つの指定した関数を適用し、結果として 1 つのシーケンスを生成します。Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results. |
AsParallel(IEnumerable) |
クエリの並列化を有効にします。Enables parallelization of a query. |
AsParallel<TSource>(IEnumerable<TSource>) |
クエリの並列化を有効にします。Enables parallelization of a query. |
AsQueryable(IEnumerable) |
IEnumerable を IQueryable に変換します。Converts an IEnumerable to an IQueryable. |
AsQueryable<TElement>(IEnumerable<TElement>) |
ジェネリックの IEnumerable<T> をジェネリックの IQueryable<T> に変換します。Converts a generic IEnumerable<T> to a generic IQueryable<T>. |
Ancestors<T>(IEnumerable<T>) |
ソース コレクション内のすべてのノードの先祖が格納された、要素のコレクションを返します。Returns a collection of elements that contains the ancestors of every node in the source collection. |
Ancestors<T>(IEnumerable<T>, XName) |
ソース コレクション内のすべてのノードの先祖が格納され、フィルター処理された要素のコレクションを返します。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 一致する XName を持つ要素のみがコレクションに含められます。Only elements that have a matching XName are included in the collection. |
DescendantNodes<T>(IEnumerable<T>) |
ソース コレクション内のすべてのドキュメントおよび要素の子孫ノードのコレクションを返します。Returns a collection of the descendant nodes of every document and element in the source collection. |
Descendants<T>(IEnumerable<T>) |
ソース コレクション内のすべての要素とドキュメントの子孫要素が格納された要素のコレクションを返します。Returns a collection of elements that contains the descendant elements of every element and document in the source collection. |
Descendants<T>(IEnumerable<T>, XName) |
ソース コレクション内のすべての要素とドキュメントの子孫要素が格納され、フィルター処理された要素のコレクションを返します。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 一致する XName を持つ要素のみがコレクションに含められます。Only elements that have a matching XName are included in the collection. |
Elements<T>(IEnumerable<T>) |
ソース コレクション内のすべての要素およびドキュメントの子要素のコレクションを返します。Returns a collection of the child elements of every element and document in the source collection. |
Elements<T>(IEnumerable<T>, XName) |
ソース コレクション内のすべての要素およびドキュメントの、フィルター処理された子要素のコレクションを返します。Returns a filtered collection of the child elements of every element and document in the source collection. 一致する XName を持つ要素のみがコレクションに含められます。Only elements that have a matching XName are included in the collection. |
InDocumentOrder<T>(IEnumerable<T>) |
ソース コレクション内のすべてのノードがドキュメント順に並べ替えて格納された、ノードのコレクションを返します。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order. |
Nodes<T>(IEnumerable<T>) |
ソース コレクション内のすべてのドキュメントおよび要素の子ノードのコレクションを返します。Returns a collection of the child nodes of every document and element in the source collection. |
Remove<T>(IEnumerable<T>) |
ソース コレクション内の親ノードからすべてのノードを削除します。Removes every node in the source collection from its parent node. |