Collection<T> Sınıf
Tanım
Genel koleksiyon için temel sınıf sağlar.Provides the base class for a generic collection.
generic <typename T>
public ref class Collection : System::Collections::Generic::ICollection<T>, System::Collections::Generic::IEnumerable<T>, System::Collections::Generic::IList<T>, System::Collections::Generic::IReadOnlyCollection<T>, System::Collections::Generic::IReadOnlyList<T>, System::Collections::IList
generic <typename T>
public ref class Collection : System::Collections::Generic::ICollection<T>, System::Collections::Generic::IEnumerable<T>, System::Collections::Generic::IList<T>, System::Collections::IList
public class Collection<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.Generic.IReadOnlyList<T>, System.Collections.IList
[System.Runtime.InteropServices.ComVisible(false)]
[System.Serializable]
public class Collection<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.IList
[System.Runtime.InteropServices.ComVisible(false)]
[System.Serializable]
public class Collection<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.Generic.IReadOnlyList<T>, System.Collections.IList
type Collection<'T> = class
interface ICollection<'T>
interface seq<'T>
interface IEnumerable
interface IList<'T>
interface IReadOnlyCollection<'T>
interface IReadOnlyList<'T>
interface ICollection
interface IList
[<System.Runtime.InteropServices.ComVisible(false)>]
[<System.Serializable>]
type Collection<'T> = class
interface IList<'T>
interface ICollection<'T>
interface seq<'T>
interface IList
interface ICollection
interface IEnumerable
[<System.Runtime.InteropServices.ComVisible(false)>]
[<System.Serializable>]
type Collection<'T> = class
interface IList<'T>
interface ICollection<'T>
interface IList
interface ICollection
interface IReadOnlyList<'T>
interface IReadOnlyCollection<'T>
interface seq<'T>
interface IEnumerable
[<System.Runtime.InteropServices.ComVisible(false)>]
[<System.Serializable>]
type Collection<'T> = class
interface IList<'T>
interface ICollection<'T>
interface seq<'T>
interface IEnumerable
interface IList
interface ICollection
interface IReadOnlyList<'T>
interface IReadOnlyCollection<'T>
type Collection<'T> = class
interface IList<'T>
interface ICollection<'T>
interface IReadOnlyList<'T>
interface IReadOnlyCollection<'T>
interface seq<'T>
interface IList
interface ICollection
interface IEnumerable
[<System.Runtime.InteropServices.ComVisible(false)>]
[<System.Serializable>]
type Collection<'T> = class
interface IList<'T>
interface IList
interface IReadOnlyList<'T>
interface ICollection<'T>
interface seq<'T>
interface IEnumerable
interface ICollection
interface IReadOnlyCollection<'T>
Public Class Collection(Of T)
Implements ICollection(Of T), IEnumerable(Of T), IList, IList(Of T), IReadOnlyCollection(Of T), IReadOnlyList(Of T)
Public Class Collection(Of T)
Implements ICollection(Of T), IEnumerable(Of T), IList, IList(Of T)
Tür Parametreleri
- T
Koleksiyondaki öğelerin türü.The type of elements in the collection.
- Devralma
-
Collection<T>
- Türetilmiş
- Öznitelikler
- Uygulamalar
Örnekler
Bu bölüm iki kod örneği içerir.This section contains two code examples. İlk örnek, sınıfının çeşitli özelliklerini ve yöntemlerini gösterir Collection<T> .The first example demonstrates several properties and methods of the Collection<T> class. İkinci örnek, oluşturulmuş bir türünden bir koleksiyon sınıfının nasıl türetileceğini Collection<T> ve Collection<T> özel davranış sağlamak için korunan yöntemlerinin nasıl geçersiz kılınacağını göstermektedir.The second example shows how to derive a collection class from a constructed type of Collection<T>, and how to override the protected methods of Collection<T> to provide custom behavior.
Örnek 1Example 1
Aşağıdaki kod örneğinde, özelliklerinin ve yöntemlerinin birçoğu gösterilmektedir Collection<T> .The following code example demonstrates many of the properties and methods of Collection<T>. Kod örneği, bir dize koleksiyonu oluşturur, Add birkaç dize eklemek için yöntemini kullanır, Count öğesini görüntüler ve dizeleri listeler.The code example creates a collection of strings, uses the Add method to add several strings, displays the Count, and lists the strings. Örnek, bir dizenin IndexOf dizinini bulmak için yöntemini ve Contains bir dizenin koleksiyonda olup olmadığını belirleme yöntemini kullanır.The example uses the IndexOf method to find the index of a string and the Contains method to determine whether a string is in the collection. Örnek, yöntemini kullanarak bir dize ekler Insert ve varsayılan Item[] Özelliği (C# ' de Dizin Oluşturucu) kullanarak dizeleri alır ve ayarlar.The example inserts a string using the Insert method and retrieves and sets strings using the default Item[] property (the indexer in C#). Örnek, yöntemini kullanarak ve metodunu kullanarak dizeleri dize kimliğine göre kaldırır Remove RemoveAt .The example removes strings by string identity using the Remove method and by index using the RemoveAt method. Son olarak, Clear Yöntemi koleksiyondaki tüm dizeleri temizlemek için kullanılır.Finally, the Clear method is used to clear all strings from the collection.
using namespace System;
using namespace System::Collections::Generic;
using namespace System::Collections::ObjectModel;
public ref class Demo
{
public:
static void Main()
{
Collection<String^>^ dinosaurs = gcnew Collection<String^>();
dinosaurs->Add("Psitticosaurus");
dinosaurs->Add("Caudipteryx");
dinosaurs->Add("Compsognathus");
dinosaurs->Add("Muttaburrasaurus");
Console::WriteLine("{0} dinosaurs:", dinosaurs->Count);
Display(dinosaurs);
Console::WriteLine("\nIndexOf(\"Muttaburrasaurus\"): {0}",
dinosaurs->IndexOf("Muttaburrasaurus"));
Console::WriteLine("\nContains(\"Caudipteryx\"): {0}",
dinosaurs->Contains("Caudipteryx"));
Console::WriteLine("\nInsert(2, \"Nanotyrannus\")");
dinosaurs->Insert(2, "Nanotyrannus");
Display(dinosaurs);
Console::WriteLine("\ndinosaurs[2]: {0}", dinosaurs[2]);
Console::WriteLine("\ndinosaurs[2] = \"Microraptor\"");
dinosaurs[2] = "Microraptor";
Display(dinosaurs);
Console::WriteLine("\nRemove(\"Microraptor\")");
dinosaurs->Remove("Microraptor");
Display(dinosaurs);
Console::WriteLine("\nRemoveAt(0)");
dinosaurs->RemoveAt(0);
Display(dinosaurs);
Console::WriteLine("\ndinosaurs.Clear()");
dinosaurs->Clear();
Console::WriteLine("Count: {0}", dinosaurs->Count);
}
private:
static void Display(Collection<String^>^ cs)
{
Console::WriteLine();
for each( String^ item in cs )
{
Console::WriteLine(item);
}
}
};
int main()
{
Demo::Main();
}
/* This code example produces the following output:
4 dinosaurs:
Psitticosaurus
Caudipteryx
Compsognathus
Muttaburrasaurus
IndexOf("Muttaburrasaurus"): 3
Contains("Caudipteryx"): True
Insert(2, "Nanotyrannus")
Psitticosaurus
Caudipteryx
Nanotyrannus
Compsognathus
Muttaburrasaurus
dinosaurs[2]: Nanotyrannus
dinosaurs[2] = "Microraptor"
Psitticosaurus
Caudipteryx
Microraptor
Compsognathus
Muttaburrasaurus
Remove("Microraptor")
Psitticosaurus
Caudipteryx
Compsognathus
Muttaburrasaurus
RemoveAt(0)
Caudipteryx
Compsognathus
Muttaburrasaurus
dinosaurs.Clear()
Count: 0
*/
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
public class Demo
{
public static void Main()
{
Collection<string> dinosaurs = new Collection<string>();
dinosaurs.Add("Psitticosaurus");
dinosaurs.Add("Caudipteryx");
dinosaurs.Add("Compsognathus");
dinosaurs.Add("Muttaburrasaurus");
Console.WriteLine("{0} dinosaurs:", dinosaurs.Count);
Display(dinosaurs);
Console.WriteLine("\nIndexOf(\"Muttaburrasaurus\"): {0}",
dinosaurs.IndexOf("Muttaburrasaurus"));
Console.WriteLine("\nContains(\"Caudipteryx\"): {0}",
dinosaurs.Contains("Caudipteryx"));
Console.WriteLine("\nInsert(2, \"Nanotyrannus\")");
dinosaurs.Insert(2, "Nanotyrannus");
Display(dinosaurs);
Console.WriteLine("\ndinosaurs[2]: {0}", dinosaurs[2]);
Console.WriteLine("\ndinosaurs[2] = \"Microraptor\"");
dinosaurs[2] = "Microraptor";
Display(dinosaurs);
Console.WriteLine("\nRemove(\"Microraptor\")");
dinosaurs.Remove("Microraptor");
Display(dinosaurs);
Console.WriteLine("\nRemoveAt(0)");
dinosaurs.RemoveAt(0);
Display(dinosaurs);
Console.WriteLine("\ndinosaurs.Clear()");
dinosaurs.Clear();
Console.WriteLine("Count: {0}", dinosaurs.Count);
}
private static void Display(Collection<string> cs)
{
Console.WriteLine();
foreach( string item in cs )
{
Console.WriteLine(item);
}
}
}
/* This code example produces the following output:
4 dinosaurs:
Psitticosaurus
Caudipteryx
Compsognathus
Muttaburrasaurus
IndexOf("Muttaburrasaurus"): 3
Contains("Caudipteryx"): True
Insert(2, "Nanotyrannus")
Psitticosaurus
Caudipteryx
Nanotyrannus
Compsognathus
Muttaburrasaurus
dinosaurs[2]: Nanotyrannus
dinosaurs[2] = "Microraptor"
Psitticosaurus
Caudipteryx
Microraptor
Compsognathus
Muttaburrasaurus
Remove("Microraptor")
Psitticosaurus
Caudipteryx
Compsognathus
Muttaburrasaurus
RemoveAt(0)
Caudipteryx
Compsognathus
Muttaburrasaurus
dinosaurs.Clear()
Count: 0
*/
Imports System.Collections.Generic
Imports System.Collections.ObjectModel
Public Class Demo
Public Shared Sub Main()
Dim dinosaurs As New Collection(Of String)
dinosaurs.Add("Psitticosaurus")
dinosaurs.Add("Caudipteryx")
dinosaurs.Add("Compsognathus")
dinosaurs.Add("Muttaburrasaurus")
Console.WriteLine("{0} dinosaurs:", dinosaurs.Count)
Display(dinosaurs)
Console.WriteLine(vbLf & "IndexOf(""Muttaburrasaurus""): {0}", _
dinosaurs.IndexOf("Muttaburrasaurus"))
Console.WriteLine(vbLf & "Contains(""Caudipteryx""): {0}", _
dinosaurs.Contains("Caudipteryx"))
Console.WriteLine(vbLf & "Insert(2, ""Nanotyrannus"")")
dinosaurs.Insert(2, "Nanotyrannus")
Display(dinosaurs)
Console.WriteLine(vbLf & "dinosaurs(2): {0}", dinosaurs(2))
Console.WriteLine(vbLf & "dinosaurs(2) = ""Microraptor""")
dinosaurs(2) = "Microraptor"
Display(dinosaurs)
Console.WriteLine(vbLf & "Remove(""Microraptor"")")
dinosaurs.Remove("Microraptor")
Display(dinosaurs)
Console.WriteLine(vbLf & "RemoveAt(0)")
dinosaurs.RemoveAt(0)
Display(dinosaurs)
Console.WriteLine(vbLf & "dinosaurs.Clear()")
dinosaurs.Clear()
Console.WriteLine("Count: {0}", dinosaurs.Count)
End Sub
Private Shared Sub Display(ByVal cs As Collection(Of String))
Console.WriteLine()
For Each item As String In cs
Console.WriteLine(item)
Next item
End Sub
End Class
' This code example produces the following output:
'
'4 dinosaurs:
'
'Psitticosaurus
'Caudipteryx
'Compsognathus
'Muttaburrasaurus
'
'IndexOf("Muttaburrasaurus"): 3
'
'Contains("Caudipteryx"): True
'
'Insert(2, "Nanotyrannus")
'
'Psitticosaurus
'Caudipteryx
'Nanotyrannus
'Compsognathus
'Muttaburrasaurus
'
'dinosaurs(2): Nanotyrannus
'
'dinosaurs(2) = "Microraptor"
'
'Psitticosaurus
'Caudipteryx
'Microraptor
'Compsognathus
'Muttaburrasaurus
'
'Remove("Microraptor")
'
'Psitticosaurus
'Caudipteryx
'Compsognathus
'Muttaburrasaurus
'
'RemoveAt(0)
'
'Caudipteryx
'Compsognathus
'Muttaburrasaurus
'
'dinosaurs.Clear()
'Count: 0
Örnek 2Example 2
Aşağıdaki kod örneği, bir koleksiyon sınıfının,,,, Collection<T> InsertItem RemoveItem ClearItems SetItem ve yöntemleri için özel davranış sağlamak üzere, Add Insert Remove Clear ,,, ve yöntemlerinin Item[] nasıl geçersiz kılınacağını ve özellik ayarlanmasını gösterir.The following code example shows how to derive a collection class from a constructed type of the Collection<T> generic class, and how to override the protected InsertItem, RemoveItem, ClearItems, and SetItem methods to provide custom behavior for the Add, Insert, Remove, and Clear methods, and for setting the Item[] property.
Bu örnek tarafından verilen özel davranış, her bir Changed
korumalı yöntemin sonunda oluşturulan bir bildirim olayıdır.The custom behavior provided by this example is a Changed
notification event that is raised at the end of each of the protected methods. Dinosaurs
Sınıfı devralır Collection<string>
( Collection(Of String)
Visual Basic) ve Changed
DinosaursChangedEventArgs
olay bilgileri için bir sınıf ve değişiklik türünü tanımlamak için bir sabit listesi kullanan olayı tanımlar.The Dinosaurs
class inherits Collection<string>
(Collection(Of String)
in Visual Basic) and defines the Changed
event, which uses a DinosaursChangedEventArgs
class for the event information, and an enumeration to identify the kind of change.
Kod örneği, Collection<T> özel olayı göstermek için çeşitli özellikleri ve yöntemleri çağırır.The code example calls several properties and methods of Collection<T> to demonstrate the custom event.
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
public class Dinosaurs : Collection<string>
{
public event EventHandler<DinosaursChangedEventArgs> Changed;
protected override void InsertItem(int index, string newItem)
{
base.InsertItem(index, newItem);
EventHandler<DinosaursChangedEventArgs> temp = Changed;
if (temp != null)
{
temp(this, new DinosaursChangedEventArgs(
ChangeType.Added, newItem, null));
}
}
protected override void SetItem(int index, string newItem)
{
string replaced = Items[index];
base.SetItem(index, newItem);
EventHandler<DinosaursChangedEventArgs> temp = Changed;
if (temp != null)
{
temp(this, new DinosaursChangedEventArgs(
ChangeType.Replaced, replaced, newItem));
}
}
protected override void RemoveItem(int index)
{
string removedItem = Items[index];
base.RemoveItem(index);
EventHandler<DinosaursChangedEventArgs> temp = Changed;
if (temp != null)
{
temp(this, new DinosaursChangedEventArgs(
ChangeType.Removed, removedItem, null));
}
}
protected override void ClearItems()
{
base.ClearItems();
EventHandler<DinosaursChangedEventArgs> temp = Changed;
if (temp != null)
{
temp(this, new DinosaursChangedEventArgs(
ChangeType.Cleared, null, null));
}
}
}
// Event argument for the Changed event.
//
public class DinosaursChangedEventArgs : EventArgs
{
public readonly string ChangedItem;
public readonly ChangeType ChangeType;
public readonly string ReplacedWith;
public DinosaursChangedEventArgs(ChangeType change, string item,
string replacement)
{
ChangeType = change;
ChangedItem = item;
ReplacedWith = replacement;
}
}
public enum ChangeType
{
Added,
Removed,
Replaced,
Cleared
};
public class Demo
{
public static void Main()
{
Dinosaurs dinosaurs = new Dinosaurs();
dinosaurs.Changed += ChangedHandler;
dinosaurs.Add("Psitticosaurus");
dinosaurs.Add("Caudipteryx");
dinosaurs.Add("Compsognathus");
dinosaurs.Add("Muttaburrasaurus");
Display(dinosaurs);
Console.WriteLine("\nIndexOf(\"Muttaburrasaurus\"): {0}",
dinosaurs.IndexOf("Muttaburrasaurus"));
Console.WriteLine("\nContains(\"Caudipteryx\"): {0}",
dinosaurs.Contains("Caudipteryx"));
Console.WriteLine("\nInsert(2, \"Nanotyrannus\")");
dinosaurs.Insert(2, "Nanotyrannus");
Console.WriteLine("\ndinosaurs[2]: {0}", dinosaurs[2]);
Console.WriteLine("\ndinosaurs[2] = \"Microraptor\"");
dinosaurs[2] = "Microraptor";
Console.WriteLine("\nRemove(\"Microraptor\")");
dinosaurs.Remove("Microraptor");
Console.WriteLine("\nRemoveAt(0)");
dinosaurs.RemoveAt(0);
Display(dinosaurs);
}
private static void Display(Collection<string> cs)
{
Console.WriteLine();
foreach( string item in cs )
{
Console.WriteLine(item);
}
}
private static void ChangedHandler(object source,
DinosaursChangedEventArgs e)
{
if (e.ChangeType==ChangeType.Replaced)
{
Console.WriteLine("{0} was replaced with {1}", e.ChangedItem,
e.ReplacedWith);
}
else if(e.ChangeType==ChangeType.Cleared)
{
Console.WriteLine("The dinosaur list was cleared.");
}
else
{
Console.WriteLine("{0} was {1}.", e.ChangedItem, e.ChangeType);
}
}
}
/* This code example produces the following output:
Psitticosaurus was Added.
Caudipteryx was Added.
Compsognathus was Added.
Muttaburrasaurus was Added.
Psitticosaurus
Caudipteryx
Compsognathus
Muttaburrasaurus
IndexOf("Muttaburrasaurus"): 3
Contains("Caudipteryx"): True
Insert(2, "Nanotyrannus")
Nanotyrannus was Added.
dinosaurs[2]: Nanotyrannus
dinosaurs[2] = "Microraptor"
Nanotyrannus was replaced with Microraptor
Remove("Microraptor")
Microraptor was Removed.
RemoveAt(0)
Psitticosaurus was Removed.
Caudipteryx
Compsognathus
Muttaburrasaurus
*/
Imports System.Collections.Generic
Imports System.Collections.ObjectModel
Public Class Dinosaurs
Inherits Collection(Of String)
Public Event Changed As EventHandler(Of DinosaursChangedEventArgs)
Protected Overrides Sub InsertItem( _
ByVal index As Integer, ByVal newItem As String)
MyBase.InsertItem(index, newItem)
RaiseEvent Changed(Me, New DinosaursChangedEventArgs( _
ChangeType.Added, newItem, Nothing))
End Sub
Protected Overrides Sub SetItem(ByVal index As Integer, _
ByVal newItem As String)
Dim replaced As String = Items(index)
MyBase.SetItem(index, newItem)
RaiseEvent Changed(Me, New DinosaursChangedEventArgs( _
ChangeType.Replaced, replaced, newItem))
End Sub
Protected Overrides Sub RemoveItem(ByVal index As Integer)
Dim removedItem As String = Items(index)
MyBase.RemoveItem(index)
RaiseEvent Changed(Me, New DinosaursChangedEventArgs( _
ChangeType.Removed, removedItem, Nothing))
End Sub
Protected Overrides Sub ClearItems()
MyBase.ClearItems()
RaiseEvent Changed(Me, New DinosaursChangedEventArgs( _
ChangeType.Cleared, Nothing, Nothing))
End Sub
End Class
' Event argument for the Changed event.
'
Public Class DinosaursChangedEventArgs
Inherits EventArgs
Public ReadOnly ChangedItem As String
Public ReadOnly ChangeType As ChangeType
Public ReadOnly ReplacedWith As String
Public Sub New(ByVal change As ChangeType, ByVal item As String, _
ByVal replacement As String)
ChangeType = change
ChangedItem = item
ReplacedWith = replacement
End Sub
End Class
Public Enum ChangeType
Added
Removed
Replaced
Cleared
End Enum
Public Class Demo
Public Shared Sub Main()
Dim dinosaurs As New Dinosaurs
AddHandler dinosaurs.Changed, AddressOf ChangedHandler
dinosaurs.Add("Psitticosaurus")
dinosaurs.Add("Caudipteryx")
dinosaurs.Add("Compsognathus")
dinosaurs.Add("Muttaburrasaurus")
Display(dinosaurs)
Console.WriteLine(vbLf & "IndexOf(""Muttaburrasaurus""): {0}", _
dinosaurs.IndexOf("Muttaburrasaurus"))
Console.WriteLine(vbLf & "Contains(""Caudipteryx""): {0}", _
dinosaurs.Contains("Caudipteryx"))
Console.WriteLine(vbLf & "Insert(2, ""Nanotyrannus"")")
dinosaurs.Insert(2, "Nanotyrannus")
Console.WriteLine(vbLf & "dinosaurs(2): {0}", dinosaurs(2))
Console.WriteLine(vbLf & "dinosaurs(2) = ""Microraptor""")
dinosaurs(2) = "Microraptor"
Console.WriteLine(vbLf & "Remove(""Microraptor"")")
dinosaurs.Remove("Microraptor")
Console.WriteLine(vbLf & "RemoveAt(0)")
dinosaurs.RemoveAt(0)
Display(dinosaurs)
End Sub
Private Shared Sub Display(ByVal cs As Collection(Of String))
Console.WriteLine()
For Each item As String In cs
Console.WriteLine(item)
Next item
End Sub
Private Shared Sub ChangedHandler(ByVal source As Object, _
ByVal e As DinosaursChangedEventArgs)
If e.ChangeType = ChangeType.Replaced Then
Console.WriteLine("{0} was replaced with {1}", _
e.ChangedItem, e.ReplacedWith)
ElseIf e.ChangeType = ChangeType.Cleared Then
Console.WriteLine("The dinosaur list was cleared.")
Else
Console.WriteLine("{0} was {1}.", _
e.ChangedItem, e.ChangeType)
End If
End Sub
End Class
' This code example produces the following output:
'
'Psitticosaurus was Added.
'Caudipteryx was Added.
'Compsognathus was Added.
'Muttaburrasaurus was Added.
'
'Psitticosaurus
'Caudipteryx
'Compsognathus
'Muttaburrasaurus
'
'IndexOf("Muttaburrasaurus"): 3
'
'Contains("Caudipteryx"): True
'
'Insert(2, "Nanotyrannus")
'Nanotyrannus was Added.
'
'dinosaurs(2): Nanotyrannus
'
'dinosaurs(2) = "Microraptor"
'Nanotyrannus was replaced with Microraptor
'
'Remove("Microraptor")
'Microraptor was Removed.
'
'RemoveAt(0)
'Psitticosaurus was Removed.
'
'Caudipteryx
'Compsognathus
'Muttaburrasaurus
Açıklamalar
Collection<T>Sınıfı, kendi oluşturulmuş türlerinden birinin bir örneğini oluşturarak hemen kullanılabilir; tüm yapmanız gereken, koleksiyonda yer alan nesne türünü belirtir.The Collection<T> class can be used immediately by creating an instance of one of its constructed types; all you have to do is specify the type of object to be contained in the collection. Ayrıca, herhangi bir derlenmiş türden kendi koleksiyon türünü türetebilirsiniz veya sınıfın kendisinden genel bir koleksiyon türü türetebilirsiniz Collection<T> .In addition, you can derive your own collection type from any constructed type, or derive a generic collection type from the Collection<T> class itself.
Collection<T>Sınıfı, öğe ekleme ve kaldırma, koleksiyonu Temizleme veya var olan bir öğenin değerini ayarlama sırasında davranışını özelleştirmek için kullanılabilecek korumalı yöntemler sağlar.The Collection<T> class provides protected methods that can be used to customize its behavior when adding and removing items, clearing the collection, or setting the value of an existing item.
Çoğu Collection<T> nesne değiştirilebilir.Most Collection<T> objects can be modified. Ancak, Collection<T> salt okunurdur bir nesneyle başlatılan bir nesne IList<T> değiştirilemez.However, a Collection<T> object that is initialized with a read-only IList<T> object cannot be modified. ReadOnlyCollection<T>Bu sınıfın salt okunurdur bir sürümü için bkz..See ReadOnlyCollection<T> for a read-only version of this class.
Bu koleksiyondaki öğelere bir tamsayı dizin kullanılarak erişilebilir.Elements in this collection can be accessed using an integer index. Bu koleksiyondaki dizinler sıfır tabanlıdır.Indexes in this collection are zero-based.
Collection<T>null
başvuru türleri için geçerli bir değer olarak kabul eder ve yinelenen öğelere izin verir.Collection<T> accepts null
as a valid value for reference types and allows duplicate elements.
Devralanlara Notlar
Bu temel sınıf, ımplemenonun özel bir koleksiyon oluşturmasını kolaylaştırmak için sağlanır.This base class is provided to make it easier for implementers to create a custom collection. Implemenonun kendi kendine oluşturulması yerine bu temel sınıfı genişletmesi önerilir.Implementers are encouraged to extend this base class instead of creating their own.
Oluşturucular
Collection<T>() |
Boş bir sınıfının yeni bir örneğini başlatır Collection<T> .Initializes a new instance of the Collection<T> class that is empty. |
Collection<T>(IList<T>) |
Collection<T>Belirtilen liste için bir sarmalayıcı olarak sınıfın yeni bir örneğini başlatır.Initializes a new instance of the Collection<T> class as a wrapper for the specified list. |
Özellikler
Count |
İçinde yer alan öğelerin sayısını alır Collection<T> .Gets the number of elements actually contained in the Collection<T>. |
Item[Int32] |
Belirtilen dizindeki öğeyi alır veya ayarlar.Gets or sets the element at the specified index. |
Items |
Etrafında bir IList<T> sarmalayıcı alır Collection<T> .Gets a IList<T> wrapper around the Collection<T>. |
Yöntemler
Add(T) |
Sonuna bir nesnesi ekler Collection<T> .Adds an object to the end of the Collection<T>. |
Clear() |
Tüm öğeleri Collection<T> koleksiyonundan kaldırır.Removes all elements from the Collection<T>. |
ClearItems() |
Tüm öğeleri Collection<T> koleksiyonundan kaldırır.Removes all elements from the Collection<T>. |
Contains(T) |
Bir öğenin içinde olup olmadığını belirler Collection<T> .Determines whether an element is in the Collection<T>. |
CopyTo(T[], Int32) |
Collection<T> Array Hedef dizinin belirtilen dizininden başlayarak, tümünü uyumlu bir tek boyutlu olarak kopyalar.Copies the entire Collection<T> to a compatible one-dimensional Array, starting at the specified index of the target array. |
Equals(Object) |
Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.Determines whether the specified object is equal to the current object. (Devralındığı yer: Object) |
GetEnumerator() |
İle yinelenen bir Numaralandırıcı döndürür Collection<T> .Returns an enumerator that iterates through the Collection<T>. |
GetHashCode() |
Varsayılan karma işlevi olarak işlev görür.Serves as the default hash function. (Devralındığı yer: Object) |
GetType() |
TypeGeçerli örneği alır.Gets the Type of the current instance. (Devralındığı yer: Object) |
IndexOf(T) |
Belirtilen nesneyi arar ve tüm içindeki ilk oluşumun sıfır tabanlı dizinini döndürür Collection<T> .Searches for the specified object and returns the zero-based index of the first occurrence within the entire Collection<T>. |
Insert(Int32, T) |
Belirtilen dizindeki öğesine bir öğesi ekler Collection<T> .Inserts an element into the Collection<T> at the specified index. |
InsertItem(Int32, T) |
Belirtilen dizindeki öğesine bir öğesi ekler Collection<T> .Inserts an element into the Collection<T> at the specified index. |
MemberwiseClone() |
Geçerli bir basit kopyasını oluşturur Object .Creates a shallow copy of the current Object. (Devralındığı yer: Object) |
Remove(T) |
İçindeki belirli bir nesnenin ilk oluşumunu kaldırır Collection<T> .Removes the first occurrence of a specific object from the Collection<T>. |
RemoveAt(Int32) |
Öğesinin belirtilen dizinindeki öğeyi kaldırır Collection<T> .Removes the element at the specified index of the Collection<T>. |
RemoveItem(Int32) |
Öğesinin belirtilen dizinindeki öğeyi kaldırır Collection<T> .Removes the element at the specified index of the Collection<T>. |
SetItem(Int32, T) |
Belirtilen dizindeki öğeyi değiştirir.Replaces the element at the specified index. |
ToString() |
Geçerli nesneyi temsil eden dizeyi döndürür.Returns a string that represents the current object. (Devralındığı yer: Object) |
Belirtik Arabirim Kullanımları
ICollection.CopyTo(Array, Int32) |
Öğesinin öğelerini ICollection Array belirli bir dizinden başlayarak öğesine kopyalar Array .Copies the elements of the ICollection to an Array, starting at a particular Array index. |
ICollection.IsSynchronized |
Erişiminin ICollection eşitlenip eşitlenmediğini (iş parçacığı güvenli) gösteren bir değer alır.Gets a value indicating whether access to the ICollection is synchronized (thread safe). |
ICollection.SyncRoot |
Erişimini eşitlemede kullanılabilecek bir nesne alır ICollection .Gets an object that can be used to synchronize access to the ICollection. |
ICollection<T>.IsReadOnly |
ICollection<T> öğesinin salt okunur olup olmadığını belirten bir değer alır.Gets a value indicating whether the ICollection<T> is read-only. |
IEnumerable.GetEnumerator() |
Bir toplulukta tekrarlanan bir numaralandırıcı döndürür.Returns an enumerator that iterates through a collection. |
IList.Add(Object) | |
IList.Contains(Object) |
' In IList belirli bir değer içerip içermediğini belirler.Determines whether the IList contains a specific value. |
IList.IndexOf(Object) |
İçindeki belirli bir öğenin dizinini belirler IList .Determines the index of a specific item in the IList. |
IList.Insert(Int32, Object) |
Belirtilen dizindeki içine bir öğe ekler IList .Inserts an item into the IList at the specified index. |
IList.IsFixedSize |
Değerinin sabit boyutta olup olmadığını gösteren bir değer alır IList .Gets a value indicating whether the IList has a fixed size. |
IList.IsReadOnly |
IList öğesinin salt okunur olup olmadığını belirten bir değer alır.Gets a value indicating whether the IList is read-only. |
IList.Item[Int32] |
Belirtilen dizindeki öğeyi alır veya ayarlar.Gets or sets the element at the specified index. |
IList.Remove(Object) |
İçindeki belirli bir nesnenin ilk oluşumunu kaldırır IList .Removes the first occurrence of a specific object from the IList. |
Uzantı Metotları
ToImmutableArray<TSource>(IEnumerable<TSource>) |
Belirtilen koleksiyondan sabit bir dizi oluşturur.Creates an immutable array from the specified collection. |
ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
Kaynak anahtarlarına bir dönüştürme işlevi uygulayarak, varolan bir öğe koleksiyonundan sabit bir sözlük oluşturur.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>) |
Bir dizinin bazı dönüştürmesinden temel olarak sabit bir sözlük oluşturur.Constructs an immutable dictionary based on some transformation of a sequence. |
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) |
Bir sırayı numaralandırır ve dönüştürür ve içeriklerinin sabit bir sözlüğünü üretir.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>) |
Bir sırayı numaralandırır ve dönüştürür ve belirtilen anahtar karşılaştırıcıyı kullanarak içeriklerinin sabit bir sözlüğünü oluşturur.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>) |
Bir sırayı numaralandırır ve dönüştürür ve belirtilen anahtar ve değer Karşılaştırıcılar kullanılarak içeriklerinin sabit bir sözlüğünü üretir.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>) |
Bir diziyi numaralandırır ve içeriklerinin sabit bir karma kümesini oluşturur.Enumerates a sequence and produces an immutable hash set of its contents. |
ToImmutableHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) |
Bir diziyi numaralandırır, içeriklerinin sabit bir karma kümesini üretir ve küme türü için belirtilen eşitlik karşılaştırıcıyı kullanır.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>) |
Bir diziyi numaralandırır ve içeriklerinin sabit bir listesini oluşturur.Enumerates a sequence and produces an immutable list of its contents. |
ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) |
Bir sırayı numaralandırır ve dönüştürür ve içeriklerinin sabit sıralanmış bir sözlüğünü üretir.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>) |
Bir sırayı numaralandırır ve dönüştürür ve belirtilen anahtar karşılaştırıcıyı kullanarak içeriklerinin sabit sıralanmış bir sözlüğünü üretir.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>) |
Bir sırayı numaralandırır ve dönüştürür ve belirtilen anahtar ve değer Karşılaştırıcılar kullanılarak içeriklerinin sabit sıralanmış bir sözlüğünü üretir.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>) |
Bir diziyi numaralandırır ve içeriklerinin sabit sıralanmış bir kümesini oluşturur.Enumerates a sequence and produces an immutable sorted set of its contents. |
ToImmutableSortedSet<TSource>(IEnumerable<TSource>, IComparer<TSource>) |
Bir diziyi numaralandırır, içeriklerinin sabit sıralanmış bir kümesini üretir ve belirtilen karşılaştırıcıyı kullanır.Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer. |
CopyToDataTable<T>(IEnumerable<T>) |
DataTable DataRow Genel parametrenin bulunduğu bir giriş nesnesi verildiğinde, nesnelerin kopyalarını içeren bir döndürür IEnumerable<T> |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) |
DataRowNesneleri DataTable , IEnumerable<T> genel parametresinin bulunduğu bir giriş nesnesi verildiğinde, belirtilen öğesine kopyalar |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) |
DataRowNesneleri DataTable , IEnumerable<T> genel parametresinin bulunduğu bir giriş nesnesi verildiğinde, belirtilen öğesine kopyalar |
Aggregate<TSource>(IEnumerable<TSource>, Func<TSource,TSource,TSource>) |
Bir sıra üzerinde bir biriktiricidir işlevi uygular.Applies an accumulator function over a sequence. |
Aggregate<TSource,TAccumulate>(IEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>) |
Bir sıra üzerinde bir biriktiricidir işlevi uygular.Applies an accumulator function over a sequence. Belirtilen çekirdek değeri, ilk biriktiricidir değeri olarak kullanılır.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>) |
Bir sıra üzerinde bir biriktiricidir işlevi uygular.Applies an accumulator function over a sequence. Belirtilen çekirdek değeri, ilk biriktiricidir değeri olarak kullanılır ve sonuç değerini seçmek için belirtilen işlev kullanılır.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>) |
Bir dizinin tüm öğelerinin bir koşulu karşılayıp karşılamadığını belirler.Determines whether all elements of a sequence satisfy a condition. |
Any<TSource>(IEnumerable<TSource>) |
Bir sıranın herhangi bir öğe içerip içermediğini belirler.Determines whether a sequence contains any elements. |
Any<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
Bir dizinin herhangi bir öğesinin bir koşulu karşılayıp karşılamadığını belirler.Determines whether any element of a sequence satisfies a condition. |
Append<TSource>(IEnumerable<TSource>, TSource) |
Dizinin sonuna bir değer ekler.Appends a value to the end of the sequence. |
AsEnumerable<TSource>(IEnumerable<TSource>) |
Olarak yazılan girişi döndürür IEnumerable<T> .Returns the input typed as IEnumerable<T>. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>) |
DecimalGiriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen bir değer dizisinin ortalamasını hesaplar.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>) |
DoubleGiriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen bir değer dizisinin ortalamasını hesaplar.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>) |
Int32Giriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen bir değer dizisinin ortalamasını hesaplar.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>) |
Int64Giriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen bir değer dizisinin ortalamasını hesaplar.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>>) |
DecimalGiriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen bir null yapılabilir değerler dizisinin ortalamasını hesaplar.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>>) |
DoubleGiriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen bir null yapılabilir değerler dizisinin ortalamasını hesaplar.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>>) |
Int32Giriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen bir null yapılabilir değerler dizisinin ortalamasını hesaplar.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>>) |
Int64Giriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen bir null yapılabilir değerler dizisinin ortalamasını hesaplar.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>>) |
SingleGiriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen bir null yapılabilir değerler dizisinin ortalamasını hesaplar.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>) |
SingleGiriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen bir değer dizisinin ortalamasını hesaplar.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) |
Öğesinin öğelerini IEnumerable belirtilen türe yayınlar.Casts the elements of an IEnumerable to the specified type. |
Concat<TSource>(IEnumerable<TSource>, IEnumerable<TSource>) |
İki diziyi art arda ekler.Concatenates two sequences. |
Contains<TSource>(IEnumerable<TSource>, TSource) |
Varsayılan eşitlik karşılaştırıcıyı kullanarak bir sıranın belirtilen öğeyi içerip içermediğini belirler.Determines whether a sequence contains a specified element by using the default equality comparer. |
Contains<TSource>(IEnumerable<TSource>, TSource, IEqualityComparer<TSource>) |
Belirtilen öğeyi kullanarak bir sıranın belirtilen öğeyi içerip içermediğini belirler IEqualityComparer<T> .Determines whether a sequence contains a specified element by using a specified IEqualityComparer<T>. |
Count<TSource>(IEnumerable<TSource>) |
Dizideki öğe sayısını döndürür.Returns the number of elements in a sequence. |
Count<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
Belirtilen dizideki kaç öğenin bir koşulu karşılayıp karşılamadığını temsil eden bir sayı döndürür.Returns a number that represents how many elements in the specified sequence satisfy a condition. |
DefaultIfEmpty<TSource>(IEnumerable<TSource>) |
Dizi boşsa, tek bir koleksiyonda belirtilen sıranın veya tür parametresinin varsayılan değerinin varsayılan değerini döndürür.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) |
Dizi boşsa, tek bir koleksiyonda belirtilen sıranın veya belirtilen değerin öğelerini döndürür.Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty. |
Distinct<TSource>(IEnumerable<TSource>) |
Değerleri karşılaştırmak için varsayılan eşitlik karşılaştırıcıyı kullanarak bir dizideki ayrı öğeleri döndürür.Returns distinct elements from a sequence by using the default equality comparer to compare values. |
Distinct<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) |
Değerleri karşılaştırmak için belirtilen ' i kullanarak bir dizideki ayrı öğeleri döndürür IEqualityComparer<T> .Returns distinct elements from a sequence by using a specified IEqualityComparer<T> to compare values. |
ElementAt<TSource>(IEnumerable<TSource>, Int32) |
Bir dizideki belirtilen dizindeki öğeyi döndürür.Returns the element at a specified index in a sequence. |
ElementAtOrDefault<TSource>(IEnumerable<TSource>, Int32) |
Dizin aralık dışında bir dizide belirtilen dizindeki öğeyi veya varsayılan değeri döndürür.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>) |
Değerleri karşılaştırmak için varsayılan eşitlik karşılaştırıcıyı kullanarak iki sıranın ayarlama farkını üretir.Produces the set difference of two sequences by using the default equality comparer to compare values. |
Except<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) |
Değerleri karşılaştırmak için belirtilen ' i kullanarak iki sıranın ayarlama farkını üretir IEqualityComparer<T> .Produces the set difference of two sequences by using the specified IEqualityComparer<T> to compare values. |
First<TSource>(IEnumerable<TSource>) |
Sıradaki ilk öğeyi döndürür.Returns the first element of a sequence. |
First<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
Belirli bir koşulu karşılayan bir dizideki ilk öğeyi döndürür.Returns the first element in a sequence that satisfies a specified condition. |
FirstOrDefault<TSource>(IEnumerable<TSource>) |
Bir dizinin ilk öğesini veya dizi hiçbir öğe içermiyorsa varsayılan değeri döndürür.Returns the first element of a sequence, or a default value if the sequence contains no elements. |
FirstOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
Bu tür bir öğe bulunamazsa, bir koşulu karşılayan dizinin ilk öğesini veya varsayılan değeri döndürür.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>) |
Bir dizinin öğelerini belirtilen bir anahtar Seçicisi işlevine göre gruplandırır.Groups the elements of a sequence according to a specified key selector function. |
GroupBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) |
Bir dizinin öğelerini belirtilen bir anahtar Seçicisi işlevine göre gruplandırır ve belirtilen karşılaştırıcıyı kullanarak anahtarları karşılaştırır.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>) |
Bir dizinin öğelerini belirtilen bir anahtar Seçici işlevine göre gruplandırır ve belirtilen bir işlevi kullanarak her grup için öğeleri projeler halinde gruplandırır.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>) |
Bir sıranın öğelerini bir anahtar Seçici işlevine göre gruplandırır.Groups the elements of a sequence according to a key selector function. Anahtarlar bir karşılaştırıcı kullanılarak karşılaştırılır ve her grubun öğeleri belirtilen bir işlev kullanılarak yansıtılmakta.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>) |
Bir dizinin öğelerini belirtilen bir anahtar Seçicisi işlevine göre gruplandırır ve her bir gruptan ve onun anahtarından bir sonuç değeri oluşturur.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>) |
Bir dizinin öğelerini belirtilen bir anahtar Seçicisi işlevine göre gruplandırır ve her bir gruptan ve onun anahtarından bir sonuç değeri oluşturur.Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. Anahtarlar, belirtilen karşılaştırıcı kullanılarak karşılaştırılır.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>) |
Bir dizinin öğelerini belirtilen bir anahtar Seçicisi işlevine göre gruplandırır ve her bir gruptan ve onun anahtarından bir sonuç değeri oluşturur.Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. Her grubun öğeleri belirtilen bir işlev kullanılarak yansıtıllardır.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>) |
Bir dizinin öğelerini belirtilen bir anahtar Seçicisi işlevine göre gruplandırır ve her bir gruptan ve onun anahtarından bir sonuç değeri oluşturur.Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. Anahtar değerleri belirtilen karşılaştırıcı kullanılarak karşılaştırılır ve her grubun öğeleri belirtilen bir işlev kullanılarak yansıtılmakta.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>) |
Anahtarların eşitliğine göre iki sıranın öğelerini karşılıklı olarak ilişkilendirir ve sonuçları gruplandırır.Correlates the elements of two sequences based on equality of keys and groups the results. Anahtarları karşılaştırmak için varsayılan eşitlik karşılaştırıcısı kullanılır.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>) |
İki sıranın öğelerini anahtar eşitliğine göre ilişkilendirir ve sonuçları gruplandırır.Correlates the elements of two sequences based on key equality and groups the results. IEqualityComparer<T>Anahtarları karşılaştırmak için belirtilen bir kullanılır.A specified IEqualityComparer<T> is used to compare keys. |
Intersect<TSource>(IEnumerable<TSource>, IEnumerable<TSource>) |
Değerleri karşılaştırmak için varsayılan eşitlik karşılaştırıcıyı kullanarak iki sıranın küme kesişimini üretir.Produces the set intersection of two sequences by using the default equality comparer to compare values. |
Intersect<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) |
Değerleri karşılaştırmak için belirtilen ' i kullanarak iki sıranın küme kesişimini üretir IEqualityComparer<T> .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>) |
İki sıranın öğelerini eşleşen anahtarlara göre karşılıklı olarak ilişkilendirir.Correlates the elements of two sequences based on matching keys. Anahtarları karşılaştırmak için varsayılan eşitlik karşılaştırıcısı kullanılır.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>) |
İki sıranın öğelerini eşleşen anahtarlara göre karşılıklı olarak ilişkilendirir.Correlates the elements of two sequences based on matching keys. IEqualityComparer<T>Anahtarları karşılaştırmak için belirtilen bir kullanılır.A specified IEqualityComparer<T> is used to compare keys. |
Last<TSource>(IEnumerable<TSource>) |
Sıradaki son öğeyi döndürür.Returns the last element of a sequence. |
Last<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
Belirtilen bir koşulu karşılayan bir dizinin son öğesini döndürür.Returns the last element of a sequence that satisfies a specified condition. |
LastOrDefault<TSource>(IEnumerable<TSource>) |
Bir sıranın son öğesini veya dizi hiçbir öğe içermiyorsa varsayılan değeri döndürür.Returns the last element of a sequence, or a default value if the sequence contains no elements. |
LastOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
Böyle bir öğe bulunmazsa bir koşulu karşılayan bir sıranın son öğesini veya varsayılan değeri döndürür.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>) |
Int64Bir dizideki toplam öğe sayısını temsil eden bir döndürür.Returns an Int64 that represents the total number of elements in a sequence. |
LongCount<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
Bir Int64 dizideki kaç öğenin bir koşulu karşılayıp karşılamadığını temsil eden bir döndürür.Returns an Int64 that represents how many elements in a sequence satisfy a condition. |
Max<TSource>(IEnumerable<TSource>) |
Genel dizideki en büyük değeri döndürür.Returns the maximum value in a generic sequence. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en büyük değeri döndürür Decimal .Invokes a transform function on each element of a sequence and returns the maximum Decimal value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Double>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en büyük değeri döndürür Double .Invokes a transform function on each element of a sequence and returns the maximum Double value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Int32>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en büyük değeri döndürür Int32 .Invokes a transform function on each element of a sequence and returns the maximum Int32 value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Int64>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en büyük değeri döndürür 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>>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en fazla boş değer atanabilir Decimal değeri döndürür.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>>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en fazla boş değer atanabilir Double değeri döndürür.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>>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en fazla boş değer atanabilir Int32 değeri döndürür.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>>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en fazla boş değer atanabilir Int64 değeri döndürür.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>>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en fazla boş değer atanabilir Single değeri döndürür.Invokes a transform function on each element of a sequence and returns the maximum nullable Single value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Single>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en büyük değeri döndürür 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>) |
Genel bir dizinin her öğesinde bir Transform işlevini çağırır ve elde edilen en büyük değeri döndürür.Invokes a transform function on each element of a generic sequence and returns the maximum resulting value. |
Min<TSource>(IEnumerable<TSource>) |
Genel bir dizideki en küçük değeri döndürür.Returns the minimum value in a generic sequence. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en küçük değeri döndürür Decimal .Invokes a transform function on each element of a sequence and returns the minimum Decimal value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Double>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en küçük değeri döndürür Double .Invokes a transform function on each element of a sequence and returns the minimum Double value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Int32>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en küçük değeri döndürür Int32 .Invokes a transform function on each element of a sequence and returns the minimum Int32 value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Int64>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en küçük değeri döndürür 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>>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en az boş değer atanabilir Decimal değeri döndürür.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>>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en az boş değer atanabilir Double değeri döndürür.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>>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en az boş değer atanabilir Int32 değeri döndürür.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>>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en az boş değer atanabilir Int64 değeri döndürür.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>>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en az boş değer atanabilir Single değeri döndürür.Invokes a transform function on each element of a sequence and returns the minimum nullable Single value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Single>) |
Bir dizideki her öğe için bir Transform işlevini çağırır ve en küçük değeri döndürür 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>) |
Genel bir dizinin her öğesinde bir Transform işlevini çağırır ve elde edilen en küçük değeri döndürür.Invokes a transform function on each element of a generic sequence and returns the minimum resulting value. |
OfType<TResult>(IEnumerable) |
Öğesinin öğelerini IEnumerable belirtilen bir türe göre filtreler.Filters the elements of an IEnumerable based on a specified type. |
OrderBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
Bir dizinin öğelerini bir anahtara göre artan düzende sıralar.Sorts the elements of a sequence in ascending order according to a key. |
OrderBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>) |
Belirtilen karşılaştırıcıyı kullanarak bir sıranın öğelerini artan düzende sıralar.Sorts the elements of a sequence in ascending order by using a specified comparer. |
OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
Bir dizinin öğelerini bir anahtara göre azalan düzende sıralar.Sorts the elements of a sequence in descending order according to a key. |
OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>) |
Belirtilen karşılaştırıcıyı kullanarak bir dizinin öğelerini azalan sırada sıralar.Sorts the elements of a sequence in descending order by using a specified comparer. |
Prepend<TSource>(IEnumerable<TSource>, TSource) |
Dizinin başlangıcına bir değer ekler.Adds a value to the beginning of the sequence. |
Reverse<TSource>(IEnumerable<TSource>) |
Bir dizideki öğelerin sırasını tersine çevirir.Inverts the order of the elements in a sequence. |
Select<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>) |
Bir dizinin her öğesini yeni bir biçimde projeler.Projects each element of a sequence into a new form. |
Select<TSource,TResult>(IEnumerable<TSource>, Func<TSource,Int32,TResult>) |
Öğenin dizinini ekleyerek bir sıranın her öğesini yeni bir biçimde projeler.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>>) |
Bir sıranın her bir öğesini bir öğesine IEnumerable<T> ve ortaya çıkan dizileri tek bir sırayla düzleştirir.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>>) |
Bir sıranın her bir öğesini bir öğesine IEnumerable<T> ve ortaya çıkan dizileri tek bir sırayla düzleştirir.Projects each element of a sequence to an IEnumerable<T>, and flattens the resulting sequences into one sequence. Her kaynak öğenin dizini, bu öğenin öngörülen formunda kullanılır.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>) |
Bir dizinin her bir öğesi için olan projeler IEnumerable<T> , ortaya çıkan dizileri tek bir sırayla düzleştirir ve içindeki her öğe için bir sonuç Seçicisi işlevini çağırır.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>) |
Bir dizinin her bir öğesi için olan projeler IEnumerable<T> , ortaya çıkan dizileri tek bir sırayla düzleştirir ve içindeki her öğe için bir sonuç Seçicisi işlevini çağırır.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. Her kaynak öğenin dizini, bu öğenin ara tasarlanan formunda kullanılır.The index of each source element is used in the intermediate projected form of that element. |
SequenceEqual<TSource>(IEnumerable<TSource>, IEnumerable<TSource>) |
İki sıranın, türleri için varsayılan eşitlik karşılaştırıcıyı kullanarak öğeleri karşılaştırarak eşit olup olmadığını belirler.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>) |
İki sıranın, öğelerini belirtilen bir kullanarak karşılaştırarak eşit olup olmadığını belirler IEqualityComparer<T> .Determines whether two sequences are equal by comparing their elements by using a specified IEqualityComparer<T>. |
Single<TSource>(IEnumerable<TSource>) |
Sıranın tek bir öğesini döndürür ve dizide tam olarak bir öğe yoksa bir özel durum oluşturur.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>) |
Belirtilen koşulu karşılayan bir dizinin tek öğesini döndürür ve birden fazla öğe varsa bir özel durum oluşturur.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>) |
Bir dizinin tek bir öğesini veya dizi boşsa varsayılan değeri döndürür; dizide birden fazla öğe varsa, bu yöntem bir özel durum oluşturur.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>) |
Belirtilen bir koşulu veya böyle bir öğe yoksa varsayılan değeri karşılayan bir dizinin tek öğesini döndürür; Bu yöntem, koşulu karşılıyorsa, birden fazla öğe bir özel durum oluşturur.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) |
Bir dizide belirtilen sayıda öğeyi atlar ve ardından kalan öğeleri döndürür.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>) |
Belirtilen koşul doğru olduğu sürece dizideki öğeleri atlar ve kalan öğeleri döndürür.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>) |
Belirtilen koşul doğru olduğu sürece dizideki öğeleri atlar ve kalan öğeleri döndürür.Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. Öğenin dizini koşul işlevinin mantığında kullanılır.The element's index is used in the logic of the predicate function. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>) |
DecimalGiriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen değer dizisinin toplamını hesaplar.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>) |
DoubleGiriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen değer dizisinin toplamını hesaplar.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>) |
Int32Giriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen değer dizisinin toplamını hesaplar.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>) |
Int64Giriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen değer dizisinin toplamını hesaplar.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>>) |
DecimalGiriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen null yapılabilir değerler dizisinin toplamını hesaplar.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>>) |
DoubleGiriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen null yapılabilir değerler dizisinin toplamını hesaplar.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>>) |
Int32Giriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen null yapılabilir değerler dizisinin toplamını hesaplar.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>>) |
Int64Giriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen null yapılabilir değerler dizisinin toplamını hesaplar.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>>) |
SingleGiriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen null yapılabilir değerler dizisinin toplamını hesaplar.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>) |
SingleGiriş dizisinin her öğesinde bir Transform işlevi çağırarak elde edilen değer dizisinin toplamını hesaplar.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) |
Bir sıranın başından itibaren belirtilen sayıda bitişik öğeyi döndürür.Returns a specified number of contiguous elements from the start of a sequence. |
TakeLast<TSource>(IEnumerable<TSource>, Int32) |
Öğesinden son öğeleri içeren yeni bir sıralanabilir koleksiyon döndürür |
TakeWhile<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
Belirtilen koşul doğru olduğu sürece bir dizideki öğeleri döndürür.Returns elements from a sequence as long as a specified condition is true. |
TakeWhile<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>) |
Belirtilen koşul doğru olduğu sürece bir dizideki öğeleri döndürür.Returns elements from a sequence as long as a specified condition is true. Öğenin dizini koşul işlevinin mantığında kullanılır.The element's index is used in the logic of the predicate function. |
ToArray<TSource>(IEnumerable<TSource>) |
Bir öğesinden bir dizi oluşturur IEnumerable<T> .Creates an array from a IEnumerable<T>. |
ToDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
Dictionary<TKey,TValue> IEnumerable<T> Belirtilen anahtar Seçici işlevine göre bir öğesinden bir oluşturur.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> Belirtilen anahtar Seçici işlevine ve anahtar karşılaştırıcısı 'na göre bir öğesinden bir oluşturur.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> Belirtilen anahtar seçicisine ve öğe Seçici işlevlerine göre bir öğesinden bir oluşturur.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> Belirtilen anahtar Seçici işlevine, karşılaştırıcının ve öğe Seçici işlevine göre bir öğesinden bir oluşturur.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>) |
Kaynağından bir oluşturur HashSet<T> IEnumerable<T> .Creates a HashSet<T> from an IEnumerable<T>. |
ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) |
HashSet<T> IEnumerable<T> Anahtarları karşılaştırmak için kullanarak öğesinden bir oluşturur |
ToList<TSource>(IEnumerable<TSource>) |
Kaynağından bir oluşturur List<T> IEnumerable<T> .Creates a List<T> from an IEnumerable<T>. |
ToLookup<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
Lookup<TKey,TElement> IEnumerable<T> Belirtilen anahtar Seçici işlevine göre bir öğesinden bir oluşturur.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> Belirtilen anahtar Seçici işlevine ve anahtar karşılaştırıcısı 'na göre bir öğesinden bir oluşturur.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> Belirtilen anahtar seçicisine ve öğe Seçici işlevlerine göre bir öğesinden bir oluşturur.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>) |
Bir Lookup<TKey,TElement> IEnumerable<T> karşılaştırıcı ve bir öğe Seçici işlevi olan belirtilen bir anahtar Seçici işlevine göre bir ile oluşturur.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>) |
Varsayılan eşitlik karşılaştırıcıyı kullanarak iki sıranın set birleşimini üretir.Produces the set union of two sequences by using the default equality comparer. |
Union<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) |
Belirtilen bir kullanarak iki sıranın set birleşimini üretir IEqualityComparer<T> .Produces the set union of two sequences by using a specified IEqualityComparer<T>. |
Where<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
Bir koşula göre bir değer dizisini filtreler.Filters a sequence of values based on a predicate. |
Where<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>) |
Bir koşula göre bir değer dizisini filtreler.Filters a sequence of values based on a predicate. Her öğenin dizini koşul işlevinin mantığındaki kullanılır.Each element's index is used in the logic of the predicate function. |
Zip<TFirst,TSecond>(IEnumerable<TFirst>, IEnumerable<TSecond>) |
Belirtilen iki dizideki öğeleri içeren bir tanımlama grubu sırası üretir.Produces a sequence of tuples with elements from the two specified sequences. |
Zip<TFirst,TSecond,TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst,TSecond,TResult>) |
Belirtilen bir işlevi, iki sıranın karşılık gelen öğelerine uygular ve sonuçların bir dizisini üretir.Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results. |
AsParallel(IEnumerable) |
Bir sorgunun paralelleştirilmesini mümkün hale getirme.Enables parallelization of a query. |
AsParallel<TSource>(IEnumerable<TSource>) |
Bir sorgunun paralelleştirilmesini mümkün hale getirme.Enables parallelization of a query. |
AsQueryable(IEnumerable) |
Bir IEnumerable öğesine dönüştürür IQueryable .Converts an IEnumerable to an IQueryable. |
AsQueryable<TElement>(IEnumerable<TElement>) |
Genel ' i IEnumerable<T> genel olarak dönüştürür IQueryable<T> .Converts a generic IEnumerable<T> to a generic IQueryable<T>. |
Ancestors<T>(IEnumerable<T>) |
Kaynak koleksiyondaki her düğümün üst öğelerini içeren öğelerin koleksiyonunu döndürür.Returns a collection of elements that contains the ancestors of every node in the source collection. |
Ancestors<T>(IEnumerable<T>, XName) |
Kaynak koleksiyondaki her düğümün üst öğelerini içeren bir öğe filtrelenmiş koleksiyonunu döndürür.Returns a filtered collection of elements that contains the ancestors of every node in the source collection. Yalnızca eşleşen öğeler XName koleksiyona dahil edilir.Only elements that have a matching XName are included in the collection. |
DescendantNodes<T>(IEnumerable<T>) |
Kaynak koleksiyondaki her belge ve öğenin alt düğümlerinin bir koleksiyonunu döndürür.Returns a collection of the descendant nodes of every document and element in the source collection. |
Descendants<T>(IEnumerable<T>) |
Kaynak koleksiyondaki her öğe ve belge için alt öğeleri içeren öğelerin koleksiyonunu döndürür.Returns a collection of elements that contains the descendant elements of every element and document in the source collection. |
Descendants<T>(IEnumerable<T>, XName) |
Kaynak koleksiyondaki her öğe ve belge için alt öğeleri içeren öğelerin filtrelenmiş bir koleksiyonunu döndürür.Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. Yalnızca eşleşen öğeler XName koleksiyona dahil edilir.Only elements that have a matching XName are included in the collection. |
Elements<T>(IEnumerable<T>) |
Kaynak koleksiyondaki her öğe ve belgenin alt öğelerinin bir koleksiyonunu döndürür.Returns a collection of the child elements of every element and document in the source collection. |
Elements<T>(IEnumerable<T>, XName) |
Kaynak koleksiyondaki her öğe ve belge için alt öğelerin filtrelenmiş bir koleksiyonunu döndürür.Returns a filtered collection of the child elements of every element and document in the source collection. Yalnızca eşleşen öğeler XName koleksiyona dahil edilir.Only elements that have a matching XName are included in the collection. |
InDocumentOrder<T>(IEnumerable<T>) |
Belge düzeninde sıralanan, kaynak koleksiyondaki tüm düğümleri içeren düğümlerin bir koleksiyonunu döndürür.Returns a collection of nodes that contains all nodes in the source collection, sorted in document order. |
Nodes<T>(IEnumerable<T>) |
Kaynak koleksiyondaki her belge ve öğenin alt düğümlerinin bir koleksiyonunu döndürür.Returns a collection of the child nodes of every document and element in the source collection. |
Remove<T>(IEnumerable<T>) |
Kaynak koleksiyondaki her düğümü üst düğümünden kaldırır.Removes every node in the source collection from its parent node. |
Şunlara uygulanır
İş Parçacığı Güvenliği
Ortak statik ( Shared
Visual Basic) bu türün üyeleri iş parçacığı güvenlidir.Public static (Shared
in Visual Basic) members of this type are thread safe. Örnek üyelerin iş parçacığı güvenli olmaları garanti edilmez.Any instance members are not guaranteed to be thread safe.
Collection<T>, Koleksiyon değiştirilmedikçe birden çok okuyucuları eşzamanlı olarak destekleyebilir.A Collection<T> can support multiple readers concurrently, as long as the collection is not modified. Bu nedenle, bir koleksiyon içinde sıralama, iş parçacığı güvenli bir yordam değildir doğası gereği.Even so, enumerating through a collection is intrinsically not a thread-safe procedure. Numaralandırma sırasında iş parçacığı güvenliği sağlamak için tüm numaralandırma sırasında koleksiyonu kilitleyebilirsiniz.To guarantee thread safety during enumeration, you can lock the collection during the entire enumeration. Okuma ve yazma için birden çok iş parçacığı tarafından erişilecek koleksiyona izin vermek için kendi eşitlemenizi uygulamalısınız.To allow the collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization.