OrderedDictionary OrderedDictionary OrderedDictionary OrderedDictionary Class

Definition

Stellt eine Auflistung von Schlüssel-Wert-Paaren dar, auf die nach Schlüssel oder Index zugegriffen werden kann.Represents a collection of key/value pairs that are accessible by the key or index.

public ref class OrderedDictionary : System::Collections::IDictionary, System::Collections::Specialized::IOrderedDictionary, System::Runtime::Serialization::IDeserializationCallback, System::Runtime::Serialization::ISerializable
[System.Serializable]
public class OrderedDictionary : System.Collections.IDictionary, System.Collections.Specialized.IOrderedDictionary, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
type OrderedDictionary = class
    interface IOrderedDictionary
    interface ISerializable
    interface IDeserializationCallback
    interface IDictionary
    interface ICollection
    interface IEnumerable
Public Class OrderedDictionary
Implements IDeserializationCallback, IDictionary, IOrderedDictionary, ISerializable
Vererbung
OrderedDictionaryOrderedDictionaryOrderedDictionaryOrderedDictionary
Abgeleitet
Attribute
Implementiert

Beispiele

Im folgenden Codebeispiel wird veranschaulicht, die Erstellung, Auffüllung und Änderung von eine OrderedDictionary Auflistung sowie zwei Verfahren zum Anzeigen der Inhalte der OrderedDictionary: mithilfe der Keys und Values Eigenschaften und die andere Erstellen einen Enumerator über die GetEnumerator Methode.The following code example demonstrates the creation, population and modification of an OrderedDictionary collection, as well as two techniques to display the contents of the OrderedDictionary: one using the Keys and Values properties and the other creating an enumerator through the GetEnumerator method.

// The following code example enumerates the elements of a OrderedDictionary.
#using <System.dll>

using namespace System;
using namespace System::Collections;
using namespace System::Collections::Specialized;

public ref class OrderedDictionarySample
{
public:
    static void Main()
    {
        // Creates and initializes a OrderedDictionary.
        OrderedDictionary^ myOrderedDictionary = gcnew OrderedDictionary();
        myOrderedDictionary->Add("testKey1", "testValue1");
        myOrderedDictionary->Add("testKey2", "testValue2");
        myOrderedDictionary->Add("keyToDelete", "valueToDelete");
        myOrderedDictionary->Add("testKey3", "testValue3");

        ICollection^ keyCollection = myOrderedDictionary->Keys;
        ICollection^ valueCollection = myOrderedDictionary->Values;

        // Display the contents using the key and value collections
        DisplayContents(keyCollection, valueCollection, myOrderedDictionary->Count);

        // Modifying the OrderedDictionary
        if (!myOrderedDictionary->IsReadOnly)
        {
            // Insert a new key to the beginning of the OrderedDictionary
            myOrderedDictionary->Insert(0, "insertedKey1", "insertedValue1");

            // Modify the value of the entry with the key "testKey2"
            myOrderedDictionary["testKey2"] = "modifiedValue";

            // Remove the last entry from the OrderedDictionary: "testKey3"
            myOrderedDictionary->RemoveAt(myOrderedDictionary->Count - 1);

            // Remove the "keyToDelete" entry, if it exists
            if (myOrderedDictionary->Contains("keyToDelete"))
            {
                myOrderedDictionary->Remove("keyToDelete");
            }
        }

        Console::WriteLine(
            "{0}Displaying the entries of a modified OrderedDictionary.",
            Environment::NewLine);
        DisplayContents(keyCollection, valueCollection, myOrderedDictionary->Count);

        // Clear the OrderedDictionary and add new values
        myOrderedDictionary->Clear();
        myOrderedDictionary->Add("newKey1", "newValue1");
        myOrderedDictionary->Add("newKey2", "newValue2");
        myOrderedDictionary->Add("newKey3", "newValue3");

        // Display the contents of the "new" Dictionary using an enumerator
        IDictionaryEnumerator^ myEnumerator =
            myOrderedDictionary->GetEnumerator();

        Console::WriteLine(
            "{0}Displaying the entries of a \"new\" OrderedDictionary.",
            Environment::NewLine);

        DisplayEnumerator(myEnumerator);

        Console::ReadLine();
    }

    // Displays the contents of the OrderedDictionary from its keys and values
    static void DisplayContents(
        ICollection^ keyCollection, ICollection^ valueCollection, int dictionarySize)
    {
        array<String^>^ myKeys = gcnew array<String^>(dictionarySize);
        array<String^>^ myValues = gcnew array<String^>(dictionarySize);
        keyCollection->CopyTo(myKeys, 0);
        valueCollection->CopyTo(myValues, 0);

        // Displays the contents of the OrderedDictionary
        Console::WriteLine("   INDEX KEY                       VALUE");
        for (int i = 0; i < dictionarySize; i++)
        {
            Console::WriteLine("   {0,-5} {1,-25} {2}",
                i, myKeys[i], myValues[i]);
        }
        Console::WriteLine();
    }

    // Displays the contents of the OrderedDictionary using its enumerator
    static void DisplayEnumerator(IDictionaryEnumerator^ myEnumerator)
    {
        Console::WriteLine("   KEY                       VALUE");
        while (myEnumerator->MoveNext())
        {
            Console::WriteLine("   {0,-25} {1}",
                myEnumerator->Key, myEnumerator->Value);
        }
    }
};

int main()
{
    OrderedDictionarySample::Main();
}

/*
This code produces the following output.

   INDEX KEY                       VALUE
   0     testKey1                  testValue1
   1     testKey2                  testValue2
   2     keyToDelete               valueToDelete
   3     testKey3                  testValue3


Displaying the entries of a modified OrderedDictionary.
   INDEX KEY                       VALUE
   0     insertedKey1              insertedValue1
   1     testKey1                  testValue1
   2     testKey2                  modifiedValue


Displaying the entries of a "new" OrderedDictionary.
   KEY                       VALUE
   newKey1                   newValue1
   newKey2                   newValue2
   newKey3                   newValue3

*/
// The following code example enumerates the elements of a OrderedDictionary.
using System;
using System.Collections;
using System.Collections.Specialized;

public class OrderedDictionarySample
{
    public static void Main()
    {

        // Creates and initializes a OrderedDictionary.
        OrderedDictionary myOrderedDictionary = new OrderedDictionary();
        myOrderedDictionary.Add("testKey1", "testValue1");
        myOrderedDictionary.Add("testKey2", "testValue2");
        myOrderedDictionary.Add("keyToDelete", "valueToDelete");
        myOrderedDictionary.Add("testKey3", "testValue3");

        ICollection keyCollection = myOrderedDictionary.Keys;
        ICollection valueCollection = myOrderedDictionary.Values;

        // Display the contents using the key and value collections
        DisplayContents(keyCollection, valueCollection, myOrderedDictionary.Count);

        // Modifying the OrderedDictionary
        if (!myOrderedDictionary.IsReadOnly)
        {
            // Insert a new key to the beginning of the OrderedDictionary
            myOrderedDictionary.Insert(0, "insertedKey1", "insertedValue1");

            // Modify the value of the entry with the key "testKey2"
            myOrderedDictionary["testKey2"] = "modifiedValue";

            // Remove the last entry from the OrderedDictionary: "testKey3"
            myOrderedDictionary.RemoveAt(myOrderedDictionary.Count - 1);

            // Remove the "keyToDelete" entry, if it exists
            if (myOrderedDictionary.Contains("keyToDelete"))
            {
                myOrderedDictionary.Remove("keyToDelete");
            }
        }

        Console.WriteLine(
            "{0}Displaying the entries of a modified OrderedDictionary.",
            Environment.NewLine);
        DisplayContents(keyCollection, valueCollection, myOrderedDictionary.Count);

        // Clear the OrderedDictionary and add new values
        myOrderedDictionary.Clear();
        myOrderedDictionary.Add("newKey1", "newValue1");
        myOrderedDictionary.Add("newKey2", "newValue2");
        myOrderedDictionary.Add("newKey3", "newValue3");

        // Display the contents of the "new" Dictionary using an enumerator
        IDictionaryEnumerator myEnumerator =
            myOrderedDictionary.GetEnumerator();

        Console.WriteLine(
            "{0}Displaying the entries of a \"new\" OrderedDictionary.",
            Environment.NewLine);

        DisplayEnumerator(myEnumerator);

        Console.ReadLine();
    }

    // Displays the contents of the OrderedDictionary from its keys and values
    public static void DisplayContents(
        ICollection keyCollection, ICollection valueCollection, int dictionarySize)
    {
        String[] myKeys = new String[dictionarySize];
        String[] myValues = new String[dictionarySize];
        keyCollection.CopyTo(myKeys, 0);
        valueCollection.CopyTo(myValues, 0);

        // Displays the contents of the OrderedDictionary
        Console.WriteLine("   INDEX KEY                       VALUE");
        for (int i = 0; i < dictionarySize; i++)
        {
            Console.WriteLine("   {0,-5} {1,-25} {2}",
                i, myKeys[i], myValues[i]);
        }
        Console.WriteLine();
    }

    // Displays the contents of the OrderedDictionary using its enumerator
    public static void DisplayEnumerator(IDictionaryEnumerator myEnumerator)
    {
        Console.WriteLine("   KEY                       VALUE");
        while (myEnumerator.MoveNext())
        {
            Console.WriteLine("   {0,-25} {1}",
                myEnumerator.Key, myEnumerator.Value);
        }
    }
}

/*
This code produces the following output.

   INDEX KEY                       VALUE
   0     testKey1                  testValue1
   1     testKey2                  testValue2
   2     keyToDelete               valueToDelete
   3     testKey3                  testValue3


Displaying the entries of a modified OrderedDictionary.
   INDEX KEY                       VALUE
   0     insertedKey1              insertedValue1
   1     testKey1                  testValue1
   2     testKey2                  modifiedValue


Displaying the entries of a "new" OrderedDictionary.
   KEY                       VALUE
   newKey1                   newValue1
   newKey2                   newValue2
   newKey3                   newValue3

*/
' The following code example enumerates the elements of a OrderedDictionary.
Imports System
Imports System.Collections
Imports System.Collections.Specialized

Public Class OrderedDictionarySample

    Public Shared Sub Main()

        ' Creates and initializes a OrderedDictionary.
        Dim myOrderedDictionary As New OrderedDictionary()
        myOrderedDictionary.Add("testKey1", "testValue1")
        myOrderedDictionary.Add("testKey2", "testValue2")
        myOrderedDictionary.Add("keyToDelete", "valueToDelete")
        myOrderedDictionary.Add("testKey3", "testValue3")

        Dim keyCollection As ICollection = myOrderedDictionary.Keys
        Dim valueCollection As ICollection = myOrderedDictionary.Values

        ' Display the contents Imports the key and value collections
        DisplayContents( _
            keyCollection, valueCollection, myOrderedDictionary.Count)

        ' Modifying the OrderedDictionary
        If Not myOrderedDictionary.IsReadOnly Then

            ' Insert a new key to the beginning of the OrderedDictionary
            myOrderedDictionary.Insert(0, "insertedKey1", "insertedValue1")

            ' Modify the value of the entry with the key "testKey2"
            myOrderedDictionary("testKey2") = "modifiedValue"

            ' Remove the last entry from the OrderedDictionary: "testKey3"
            myOrderedDictionary.RemoveAt(myOrderedDictionary.Count - 1)

            ' Remove the "keyToDelete" entry, if it exists
            If (myOrderedDictionary.Contains("keyToDelete")) Then
                myOrderedDictionary.Remove("keyToDelete")
            End If
        End If

        Console.WriteLine( _
            "{0}Displaying the entries of a modified OrderedDictionary.", _
            Environment.NewLine)
        DisplayContents( _
            keyCollection, valueCollection, myOrderedDictionary.Count)

        ' Clear the OrderedDictionary and add new values
        myOrderedDictionary.Clear()
        myOrderedDictionary.Add("newKey1", "newValue1")
        myOrderedDictionary.Add("newKey2", "newValue2")
        myOrderedDictionary.Add("newKey3", "newValue3")

        ' Display the contents of the "new" Dictionary Imports an enumerator
        Dim myEnumerator As IDictionaryEnumerator = _
            myOrderedDictionary.GetEnumerator()

        Console.WriteLine( _
            "{0}Displaying the entries of a 'new' OrderedDictionary.", _
            Environment.NewLine)

        DisplayEnumerator(myEnumerator)

        Console.ReadLine()
    End Sub

    ' Displays the contents of the OrderedDictionary from its keys and values
    Public Shared Sub DisplayContents( _
        ByVal keyCollection As ICollection, _
        ByVal valueCollection As ICollection, ByVal dictionarySize As Integer)

        Dim myKeys(dictionarySize) As [String]
        Dim myValues(dictionarySize) As [String]
        keyCollection.CopyTo(myKeys, 0)
        valueCollection.CopyTo(myValues, 0)

        ' Displays the contents of the OrderedDictionary
        Console.WriteLine("   INDEX KEY                       VALUE")
        Dim i As Integer
        For i = 0 To dictionarySize - 1
            Console.WriteLine("   {0,-5} {1,-25} {2}", _
                 i, myKeys(i), myValues(i))
        Next i
        Console.WriteLine()
    End Sub

    ' Displays the contents of the OrderedDictionary using its enumerator
    Public Shared Sub DisplayEnumerator( _
        ByVal myEnumerator As IDictionaryEnumerator)

        Console.WriteLine("   KEY                       VALUE")
        While myEnumerator.MoveNext()
            Console.WriteLine("   {0,-25} {1}", _
                myEnumerator.Key, myEnumerator.Value)
        End While
    End Sub
End Class

'This code produces the following output.
'
'   INDEX KEY                       VALUE
'0:              testKey1(testValue1)
'1:              testKey2(testValue2)
'2:              keyToDelete(valueToDelete)
'3:              testKey3(testValue3)
'
'
'Displaying the entries of a modified OrderedDictionary.
'   INDEX KEY                       VALUE
'0:              insertedKey1(insertedValue1)
'1:              testKey1(testValue1)
'2:              testKey2(modifiedValue)
'
'
'Displaying the entries of a "new" OrderedDictionary.
'                KEY(VALUE)
'                newKey1(newValue1)
'                newKey2(newValue2)
'                newKey3(newValue3)

Hinweise

Jedes Element ist ein Schlüssel/Wert-Paar gespeichert, die einem DictionaryEntry Objekt.Each element is a key/value pair stored in a DictionaryEntry object. Ein Schlüssel kann nicht null, aber ein Wert sein kann.A key cannot be null, but a value can be.

Die Elemente einer OrderedDictionary werden nicht nach dem Schlüssel im Gegensatz zu die Elemente sortiert eine SortedDictionary<TKey,TValue> Klasse.The elements of an OrderedDictionary are not sorted by the key, unlike the elements of a SortedDictionary<TKey,TValue> class. Sie können Elemente entweder durch den Schlüssel oder den Index zugreifen.You can access elements either by the key or by the index.

Die foreach -Anweisung der c#-Sprache (For Each in Visual Basic) gibt Objekte, die den Typ jedes Elements in der Auflistung.The foreach statement of the C# language (For Each in Visual Basic) returns objects that are of the type of each element in the collection. Da jedes Element von der OrderedDictionary Auflistung ist ein Schlüssel/Wert-Paar, Typ des Elements nicht den Typ des Schlüssels oder den Typ des Werts.Since each element of the OrderedDictionary collection is a key/value pair, the element type is not the type of the key or the type of the value. Stattdessen ist der Typ des Elements DictionaryEntry.Instead, the element type is DictionaryEntry. Der folgende Code zeigt die Syntax von c#, Visual Basic und C++.The following code shows C#, Visual Basic and C++ syntax.

for each (DictionaryEntry de in myOrderedDictionary)
{
    //...
}
foreach (DictionaryEntry de in myOrderedDictionary)
{
    //...
}
For Each de As DictionaryEntry In myOrderedDictionary
    '...
Next de

Die foreach Anweisung ist ein Wrapper um den Enumerator, der nur das Lesen aus nicht das Schreiben in die Auflistung zulässt.The foreach statement is a wrapper around the enumerator, which only allows reading from, not writing to, the collection.

Konstruktoren

OrderedDictionary() OrderedDictionary() OrderedDictionary() OrderedDictionary()

Initialisiert eine neue Instanz der OrderedDictionary-Klasse.Initializes a new instance of the OrderedDictionary class.

OrderedDictionary(IEqualityComparer) OrderedDictionary(IEqualityComparer) OrderedDictionary(IEqualityComparer) OrderedDictionary(IEqualityComparer)

Initialisiert eine neue Instanz der OrderedDictionary-Klasse anhand des angegebenen Vergleichs.Initializes a new instance of the OrderedDictionary class using the specified comparer.

OrderedDictionary(Int32) OrderedDictionary(Int32) OrderedDictionary(Int32) OrderedDictionary(Int32)

Initialisiert eine neue Instanz der OrderedDictionary-Klasse anhand der angegebenen Anfangskapazität.Initializes a new instance of the OrderedDictionary class using the specified initial capacity.

OrderedDictionary(Int32, IEqualityComparer) OrderedDictionary(Int32, IEqualityComparer) OrderedDictionary(Int32, IEqualityComparer) OrderedDictionary(Int32, IEqualityComparer)

Initialisiert eine neue Instanz der OrderedDictionary-Klasse anhand der angegebenen Anfangskapazität und des angegebenen Comparers.Initializes a new instance of the OrderedDictionary class using the specified initial capacity and comparer.

OrderedDictionary(SerializationInfo, StreamingContext) OrderedDictionary(SerializationInfo, StreamingContext) OrderedDictionary(SerializationInfo, StreamingContext) OrderedDictionary(SerializationInfo, StreamingContext)

Initialisiert eine neue Instanz der serialisierbaren OrderedDictionary-Klasse anhand des angegebenen SerializationInfo-Objekts und StreamingContext-Objektes.Initializes a new instance of the OrderedDictionary class that is serializable using the specified SerializationInfo and StreamingContext objects.

Eigenschaften

Count Count Count Count

Ruft die Anzahl der Schlüssel-Wert-Paare in der OrderedDictionary-Auflistung ab.Gets the number of key/values pairs contained in the OrderedDictionary collection.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

Ruft einen Wert ab, der angibt, ob die OrderedDictionary-Auflistung schreibgeschützt ist.Gets a value indicating whether the OrderedDictionary collection is read-only.

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

Ruft den Wert am angegebenen Index ab oder legt diesen fest.Gets or sets the value at the specified index.

Item[Object] Item[Object] Item[Object] Item[Object]

Ruft den Wert mit dem angegebenen Schlüssel ab oder legt diesen fest.Gets or sets the value with the specified key.

Keys Keys Keys Keys

Ruft ein ICollection-Objekt ab, das die Schlüssel der OrderedDictionary-Auflistung enthält.Gets an ICollection object containing the keys in the OrderedDictionary collection.

Values Values Values Values

Ruft ein ICollection-Objekt ab, das die Werte der OrderedDictionary-Auflistung enthält.Gets an ICollection object containing the values in the OrderedDictionary collection.

Methoden

Add(Object, Object) Add(Object, Object) Add(Object, Object) Add(Object, Object)

Fügt der OrderedDictionary-Auflistung am kleinsten verfügbaren Index einen Eintrag mit dem angegebenen Schlüssel und Wert hinzu.Adds an entry with the specified key and value into the OrderedDictionary collection with the lowest available index.

AsReadOnly() AsReadOnly() AsReadOnly() AsReadOnly()

Gibt eine schreibgeschützte Kopie der aktuellen OrderedDictionary-Auflistung zurück.Returns a read-only copy of the current OrderedDictionary collection.

Clear() Clear() Clear() Clear()

Entfernt alle Elemente aus der OrderedDictionary-Auflistung.Removes all elements from the OrderedDictionary collection.

Contains(Object) Contains(Object) Contains(Object) Contains(Object)

Bestimmt, ob die OrderedDictionary-Auflistung einen bestimmten Schlüssel enthält.Determines whether the OrderedDictionary collection contains a specific key.

CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32)

Kopiert die OrderedDictionary-Elemente am angegebenen Index in ein eindimensionales Array-Objekt.Copies the OrderedDictionary elements to a one-dimensional Array object at the specified index.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Bestimmt, ob das angegebene Objekt mit dem aktuellen Objekt identisch ist.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Gibt ein IDictionaryEnumerator-Objekt zurück, das die OrderedDictionary-Auflistung durchläuft.Returns an IDictionaryEnumerator object that iterates through the OrderedDictionary collection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Fungiert als Standardhashfunktion.Serves as the default hash function.

(Inherited from Object)
GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext)

Implementiert die ISerializable-Schnittstelle und gibt die zum Serialisieren der OrderedDictionary-Auflistung erforderlichen Daten zurück.Implements the ISerializable interface and returns the data needed to serialize the OrderedDictionary collection.

GetType() GetType() GetType() GetType()

Ruft den Type der aktuellen Instanz ab.Gets the Type of the current instance.

(Inherited from Object)
Insert(Int32, Object, Object) Insert(Int32, Object, Object) Insert(Int32, Object, Object) Insert(Int32, Object, Object)

Fügt am angegebenen Index einen neuen Eintrag mit dem angegebenen Schlüssel und Wert in die OrderedDictionary-Auflistung ein.Inserts a new entry into the OrderedDictionary collection with the specified key and value at the specified index.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Erstellt eine flache Kopie des aktuellen Object.Creates a shallow copy of the current Object.

(Inherited from Object)
OnDeserialization(Object) OnDeserialization(Object) OnDeserialization(Object) OnDeserialization(Object)

Implementiert die ISerializable-Schnittstelle und wird nach Abschluss der Deserialisierung durch das Deserialisierungsereignis aufgerufen.Implements the ISerializable interface and is called back by the deserialization event when deserialization is complete.

Remove(Object) Remove(Object) Remove(Object) Remove(Object)

Entfernt der Eintrag mit dem angegebenen Schlüssel aus der OrderedDictionary-Auflistung.Removes the entry with the specified key from the OrderedDictionary collection.

RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

Entfernt den Eintrag am angegebenen Index aus der OrderedDictionary-Auflistung.Removes the entry at the specified index from the OrderedDictionary collection.

ToString() ToString() ToString() ToString()

Gibt eine Zeichenfolge zurück, die das aktuelle Objekt darstellt.Returns a string that represents the current object.

(Inherited from Object)

Explizite Schnittstellenimplementierungen

ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

Ruft einen Wert ab, der angibt, ob der Zugriff auf das OrderedDictionary-Objekt synchronisiert (threadsicher) ist.Gets a value indicating whether access to the OrderedDictionary object is synchronized (thread-safe).

ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

Ruft ein Objekt ab, mit dem der Zugriff auf das OrderedDictionary-Objekt synchronisiert werden kann.Gets an object that can be used to synchronize access to the OrderedDictionary object.

IDeserializationCallback.OnDeserialization(Object) IDeserializationCallback.OnDeserialization(Object) IDeserializationCallback.OnDeserialization(Object) IDeserializationCallback.OnDeserialization(Object)

Implementiert die ISerializable-Schnittstelle und wird nach Abschluss der Deserialisierung durch das Deserialisierungsereignis aufgerufen.Implements the ISerializable interface and is called back by the deserialization event when deserialization is complete.

IDictionary.IsFixedSize IDictionary.IsFixedSize IDictionary.IsFixedSize IDictionary.IsFixedSize

Ruft einen Wert ab, der angibt, ob das OrderedDictionary eine feste Größe aufweist.Gets a value indicating whether the OrderedDictionary has a fixed size.

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

Gibt ein IDictionaryEnumerator-Objekt zurück, das die OrderedDictionary-Auflistung durchläuft.Returns an IDictionaryEnumerator object that iterates through the OrderedDictionary collection.

Erweiterungsmethoden

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Wandelt die Elemente eines IEnumerable in den angegebenen Typ umCasts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

Filtert die Elemente eines IEnumerable anhand eines angegebenen TypsFilters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Ermöglicht die Parallelisierung einer Abfrage.Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Konvertiert einen IEnumerable in einen IQueryable.Converts an IEnumerable to an IQueryable.

Gilt für: