IDictionary<TKey,TValue> Interfaz

Definición

Representa una colección genérica de pares clave-valor.Represents a generic collection of key/value pairs.

generic <typename TKey, typename TValue>
public interface class IDictionary : System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<TKey, TValue>>, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>>
public interface IDictionary<TKey,TValue> : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>>
type IDictionary<'Key, 'Value> = interface
    interface ICollection<KeyValuePair<'Key, 'Value>>
    interface seq<KeyValuePair<'Key, 'Value>>
    interface IEnumerable
Public Interface IDictionary(Of TKey, TValue)
Implements ICollection(Of KeyValuePair(Of TKey, TValue)), IEnumerable(Of KeyValuePair(Of TKey, TValue))

Parámetros de tipo

TKey

Tipo de claves del diccionario.The type of keys in the dictionary.

TValue

Tipo de valores del diccionario.The type of values in the dictionary.

Derivado
Implementaciones

Ejemplos

En el ejemplo de código siguiente se Dictionary<TKey,TValue> crea un vacío de cadenas, con claves de cadena, y se IDictionary<TKey,TValue> accede a ella a través de la interfaz.The following code example creates an empty Dictionary<TKey,TValue> of strings, with string keys, and accesses it through the IDictionary<TKey,TValue> interface.

En el ejemplo de código Add se usa el método para agregar algunos elementos.The code example uses the Add method to add some elements. En el ejemplo se muestra Add que el método ArgumentException produce al intentar agregar una clave duplicada.The example demonstrates that the Add method throws ArgumentException when attempting to add a duplicate key.

En el ejemplo se Item[TKey] usa la propiedad (el indizador en C#) para recuperar valores, lo que muestra KeyNotFoundException que se produce una excepción cuando una clave solicitada no está presente y que muestra que se puede reemplazar el valor asociado a una clave.The example uses the Item[TKey] property (the indexer in C#) to retrieve values, demonstrating that a KeyNotFoundException is thrown when a requested key is not present, and showing that the value associated with a key can be replaced.

En el ejemplo se muestra cómo utilizar TryGetValue el método como una forma más eficaz de recuperar valores si un programa debe probar con frecuencia valores de clave que no están en el Diccionario y cómo usar ContainsKey el método para comprobar si existe una clave antes de llamar Adda.método.The example shows how to use the TryGetValue method as a more efficient way to retrieve values if a program often must try key values that are not in the dictionary, and how to use the ContainsKey method to test whether a key exists prior to calling the Add method.

Por último, en el ejemplo se muestra cómo enumerar las claves y los valores del diccionario y cómo enumerar los valores por sí solo Values mediante la propiedad.Finally, the example shows how to enumerate the keys and values in the dictionary, and how to enumerate the values alone using the Values property.

using namespace System;
using namespace System::Collections::Generic;

public ref class Example
{
public:
    static void Main()
    {
        // Create a new dictionary of strings, with string keys,
        // and access it through the IDictionary generic interface.
        IDictionary<String^, String^>^ openWith =
            gcnew Dictionary<String^, String^>();

        // Add some elements to the dictionary. There are no
        // duplicate keys, but some of the values are duplicates.
        openWith->Add("txt", "notepad.exe");
        openWith->Add("bmp", "paint.exe");
        openWith->Add("dib", "paint.exe");
        openWith->Add("rtf", "wordpad.exe");

        // The Add method throws an exception if the new key is
        // already in the dictionary.
        try
        {
            openWith->Add("txt", "winword.exe");
        }
        catch (ArgumentException^)
        {
            Console::WriteLine("An element with Key = \"txt\" already exists.");
        }

        // The Item property is another name for the indexer, so you
        // can omit its name when accessing elements.
        Console::WriteLine("For key = \"rtf\", value = {0}.",
            openWith["rtf"]);

        // The indexer can be used to change the value associated
        // with a key.
        openWith["rtf"] = "winword.exe";
        Console::WriteLine("For key = \"rtf\", value = {0}.",
            openWith["rtf"]);

        // If a key does not exist, setting the indexer for that key
        // adds a new key/value pair.
        openWith["doc"] = "winword.exe";

        // The indexer throws an exception if the requested key is
        // not in the dictionary.
        try
        {
            Console::WriteLine("For key = \"tif\", value = {0}.",
                openWith["tif"]);
        }
        catch (KeyNotFoundException^)
        {
            Console::WriteLine("Key = \"tif\" is not found.");
        }

        // When a program often has to try keys that turn out not to
        // be in the dictionary, TryGetValue can be a more efficient
        // way to retrieve values.
        String^ value = "";
        if (openWith->TryGetValue("tif", value))
        {
            Console::WriteLine("For key = \"tif\", value = {0}.", value);
        }
        else
        {
            Console::WriteLine("Key = \"tif\" is not found.");
        }

        // ContainsKey can be used to test keys before inserting
        // them.
        if (!openWith->ContainsKey("ht"))
        {
            openWith->Add("ht", "hypertrm.exe");
            Console::WriteLine("Value added for key = \"ht\": {0}",
                openWith["ht"]);
        }

        // When you use foreach to enumerate dictionary elements,
        // the elements are retrieved as KeyValuePair objects.
        Console::WriteLine();
        for each( KeyValuePair<String^, String^> kvp in openWith )
        {
            Console::WriteLine("Key = {0}, Value = {1}",
                kvp.Key, kvp.Value);
        }

        // To get the values alone, use the Values property.
        ICollection<String^>^ icoll = openWith->Values;

        // The elements of the ValueCollection are strongly typed
        // with the type that was specified for dictionary values.
        Console::WriteLine();
        for each( String^ s in icoll )
        {
            Console::WriteLine("Value = {0}", s);
        }

        // To get the keys alone, use the Keys property.
        icoll = openWith->Keys;

        // The elements of the ValueCollection are strongly typed
        // with the type that was specified for dictionary values.
        Console::WriteLine();
        for each( String^ s in icoll )
        {
            Console::WriteLine("Key = {0}", s);
        }

        // Use the Remove method to remove a key/value pair.
        Console::WriteLine("\nRemove(\"doc\")");
        openWith->Remove("doc");

        if (!openWith->ContainsKey("doc"))
        {
            Console::WriteLine("Key \"doc\" is not found.");
        }
    }
};

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

/* This code example produces the following output:

An element with Key = "txt" already exists.
For key = "rtf", value = wordpad.exe.
For key = "rtf", value = winword.exe.
Key = "tif" is not found.
Key = "tif" is not found.
Value added for key = "ht": hypertrm.exe

Key = txt, Value = notepad.exe
Key = bmp, Value = paint.exe
Key = dib, Value = paint.exe
Key = rtf, Value = winword.exe
Key = doc, Value = winword.exe
Key = ht, Value = hypertrm.exe

Value = notepad.exe
Value = paint.exe
Value = paint.exe
Value = winword.exe
Value = winword.exe
Value = hypertrm.exe

Key = txt
Key = bmp
Key = dib
Key = rtf
Key = doc
Key = ht

Remove("doc")
Key "doc" is not found.
 */
using System;
using System.Collections.Generic;

public class Example
{
    public static void Main()
    {
        // Create a new dictionary of strings, with string keys, 
        // and access it through the IDictionary generic interface.
        IDictionary<string, string> openWith = 
            new Dictionary<string, string>();

        // Add some elements to the dictionary. There are no 
        // duplicate keys, but some of the values are duplicates.
        openWith.Add("txt", "notepad.exe");
        openWith.Add("bmp", "paint.exe");
        openWith.Add("dib", "paint.exe");
        openWith.Add("rtf", "wordpad.exe");

        // The Add method throws an exception if the new key is 
        // already in the dictionary.
        try
        {
            openWith.Add("txt", "winword.exe");
        }
        catch (ArgumentException)
        {
            Console.WriteLine("An element with Key = \"txt\" already exists.");
        }

        // The Item property is another name for the indexer, so you 
        // can omit its name when accessing elements. 
        Console.WriteLine("For key = \"rtf\", value = {0}.", 
            openWith["rtf"]);

        // The indexer can be used to change the value associated
        // with a key.
        openWith["rtf"] = "winword.exe";
        Console.WriteLine("For key = \"rtf\", value = {0}.", 
            openWith["rtf"]);

        // If a key does not exist, setting the indexer for that key
        // adds a new key/value pair.
        openWith["doc"] = "winword.exe";

        // The indexer throws an exception if the requested key is
        // not in the dictionary.
        try
        {
            Console.WriteLine("For key = \"tif\", value = {0}.", 
                openWith["tif"]);
        }
        catch (KeyNotFoundException)
        {
            Console.WriteLine("Key = \"tif\" is not found.");
        }

        // When a program often has to try keys that turn out not to
        // be in the dictionary, TryGetValue can be a more efficient 
        // way to retrieve values.
        string value = "";
        if (openWith.TryGetValue("tif", out value))
        {
            Console.WriteLine("For key = \"tif\", value = {0}.", value);
        }
        else
        {
            Console.WriteLine("Key = \"tif\" is not found.");
        }

        // ContainsKey can be used to test keys before inserting 
        // them.
        if (!openWith.ContainsKey("ht"))
        {
            openWith.Add("ht", "hypertrm.exe");
            Console.WriteLine("Value added for key = \"ht\": {0}", 
                openWith["ht"]);
        }

        // When you use foreach to enumerate dictionary elements,
        // the elements are retrieved as KeyValuePair objects.
        Console.WriteLine();
        foreach( KeyValuePair<string, string> kvp in openWith )
        {
            Console.WriteLine("Key = {0}, Value = {1}", 
                kvp.Key, kvp.Value);
        }

        // To get the values alone, use the Values property.
        ICollection<string> icoll = openWith.Values;

        // The elements of the ValueCollection are strongly typed
        // with the type that was specified for dictionary values.
        Console.WriteLine();
        foreach( string s in icoll )
        {
            Console.WriteLine("Value = {0}", s);
        }

        // To get the keys alone, use the Keys property.
        icoll = openWith.Keys;

        // The elements of the ValueCollection are strongly typed
        // with the type that was specified for dictionary values.
        Console.WriteLine();
        foreach( string s in icoll )
        {
            Console.WriteLine("Key = {0}", s);
        }

        // Use the Remove method to remove a key/value pair.
        Console.WriteLine("\nRemove(\"doc\")");
        openWith.Remove("doc");

        if (!openWith.ContainsKey("doc"))
        {
            Console.WriteLine("Key \"doc\" is not found.");
        }
    }
}

/* This code example produces the following output:

An element with Key = "txt" already exists.
For key = "rtf", value = wordpad.exe.
For key = "rtf", value = winword.exe.
Key = "tif" is not found.
Key = "tif" is not found.
Value added for key = "ht": hypertrm.exe

Key = txt, Value = notepad.exe
Key = bmp, Value = paint.exe
Key = dib, Value = paint.exe
Key = rtf, Value = winword.exe
Key = doc, Value = winword.exe
Key = ht, Value = hypertrm.exe

Value = notepad.exe
Value = paint.exe
Value = paint.exe
Value = winword.exe
Value = winword.exe
Value = hypertrm.exe

Key = txt
Key = bmp
Key = dib
Key = rtf
Key = doc
Key = ht

Remove("doc")
Key "doc" is not found.
 */
Imports System.Collections.Generic

Public Class Example
    
    Public Shared Sub Main() 

        ' Create a new dictionary of strings, with string keys, 
        ' and access it through the IDictionary generic interface.
        Dim openWith As IDictionary(Of String, String) = _
            New Dictionary(Of String, String)
        
        ' Add some elements to the dictionary. There are no 
        ' duplicate keys, but some of the values are duplicates.
        openWith.Add("txt", "notepad.exe")
        openWith.Add("bmp", "paint.exe")
        openWith.Add("dib", "paint.exe")
        openWith.Add("rtf", "wordpad.exe")
        
        ' The Add method throws an exception if the new key is 
        ' already in the dictionary.
        Try
            openWith.Add("txt", "winword.exe")
        Catch 
            Console.WriteLine("An element with Key = ""txt"" already exists.")
        End Try

        ' The Item property is the default property, so you 
        ' can omit its name when accessing elements. 
        Console.WriteLine("For key = ""rtf"", value = {0}.", _
            openWith("rtf"))
        
        ' The default Item property can be used to change the value
        ' associated with a key.
        openWith("rtf") = "winword.exe"
        Console.WriteLine("For key = ""rtf"", value = {0}.", _
            openWith("rtf"))
        
        ' If a key does not exist, setting the default item property
        ' for that key adds a new key/value pair.
        openWith("doc") = "winword.exe"

        ' The default Item property throws an exception if the requested
        ' key is not in the dictionary.
        Try
            Console.WriteLine("For key = ""tif"", value = {0}.", _
                openWith("tif"))
        Catch 
            Console.WriteLine("Key = ""tif"" is not found.")
        End Try

        ' When a program often has to try keys that turn out not to
        ' be in the dictionary, TryGetValue can be a more efficient 
        ' way to retrieve values.
        Dim value As String = ""
        If openWith.TryGetValue("tif", value) Then
            Console.WriteLine("For key = ""tif"", value = {0}.", value)
        Else
            Console.WriteLine("Key = ""tif"" is not found.")
        End If

        ' ContainsKey can be used to test keys before inserting 
        ' them.
        If Not openWith.ContainsKey("ht") Then
            openWith.Add("ht", "hypertrm.exe")
            Console.WriteLine("Value added for key = ""ht"": {0}", _
                openWith("ht"))
        End If

        ' When you use foreach to enumerate dictionary elements,
        ' the elements are retrieved as KeyValuePair objects.
        Console.WriteLine()
        For Each kvp As KeyValuePair(Of String, String) In openWith
            Console.WriteLine("Key = {0}, Value = {1}", _
                kvp.Key, kvp.Value)
        Next kvp

        ' To get the values alone, use the Values property.
        Dim icoll As ICollection(Of String) = openWith.Values
        
        ' The elements of the ValueCollection are strongly typed
        ' with the type that was specified for dictionary values.
        Console.WriteLine()
        For Each s As String In  icoll
            Console.WriteLine("Value = {0}", s)
        Next s

        ' To get the keys alone, use the Keys property.
        icoll = openWith.Keys
        
        ' The elements of the ValueCollection are strongly typed
        ' with the type that was specified for dictionary values.
        Console.WriteLine()
        For Each s As String In  icoll
            Console.WriteLine("Key = {0}", s)
        Next s

        ' Use the Remove method to remove a key/value pair.
        Console.WriteLine(vbLf + "Remove(""doc"")")
        openWith.Remove("doc")
        
        If Not openWith.ContainsKey("doc") Then
            Console.WriteLine("Key ""doc"" is not found.")
        End If

    End Sub

End Class

' This code example produces the following output:
'
'An element with Key = "txt" already exists.
'For key = "rtf", value = wordpad.exe.
'For key = "rtf", value = winword.exe.
'Key = "tif" is not found.
'Key = "tif" is not found.
'Value added for key = "ht": hypertrm.exe
'
'Key = txt, Value = notepad.exe
'Key = bmp, Value = paint.exe
'Key = dib, Value = paint.exe
'Key = rtf, Value = winword.exe
'Key = doc, Value = winword.exe
'Key = ht, Value = hypertrm.exe
'
'Value = notepad.exe
'Value = paint.exe
'Value = paint.exe
'Value = winword.exe
'Value = winword.exe
'Value = hypertrm.exe
'
'Key = txt
'Key = bmp
'Key = dib
'Key = rtf
'Key = doc
'Key = ht
'
'Remove("doc")
'Key "doc" is not found.
' 

Comentarios

La IDictionary<TKey,TValue> interfaz es la interfaz base para las colecciones genéricas de pares clave-valor.The IDictionary<TKey,TValue> interface is the base interface for generic collections of key/value pairs.

Cada elemento es un par clave-valor almacenado en un KeyValuePair<TKey,TValue> objeto.Each element is a key/value pair stored in a KeyValuePair<TKey,TValue> object.

Cada par debe tener una clave única.Each pair must have a unique key. Las implementaciones pueden variar en lo key que se nullrequieran.Implementations can vary in whether they allow key to be null. El valor puede ser null y no tiene que ser único.The value can be null and does not have to be unique. La IDictionary<TKey,TValue> interfaz permite enumerar las claves y los valores contenidos, pero no implica ningún criterio de ordenación concreto.The IDictionary<TKey,TValue> interface allows the contained keys and values to be enumerated, but it does not imply any particular sort order.

La foreach instrucción del C# lenguajeFor Each (en Visual Basic, for each en C++) devuelve un objeto del tipo de los elementos de la colección.The foreach statement of the C# language (For Each in Visual Basic, for each in C++) returns an object of the type of the elements in the collection. Puesto que cada elemento de IDictionary<TKey,TValue> es un par clave-valor, el tipo de elemento no es el tipo de la clave o el tipo del valor.Since each element of the IDictionary<TKey,TValue> is a key/value pair, the element type is not the type of the key or the type of the value. En su lugar, el tipo de KeyValuePair<TKey,TValue>elemento es.Instead, the element type is KeyValuePair<TKey,TValue>. Por ejemplo:For example:

for each(KeyValuePair<int, String^> kvp in myDictionary)
{
    Console::WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value);
}
foreach (KeyValuePair<int, string> kvp in myDictionary)
{
    Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value);
}
For Each kvp As KeyValuePair(Of Integer, String) In myDictionary
    Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value)
Next kvp

La foreach instrucción es un contenedor alrededor del enumerador, que solo permite la lectura, no la escritura, de la colección.The foreach statement is a wrapper around the enumerator, which only allows reading from, not writing to, the collection.

Nota

Dado que las claves se pueden heredar y cambiar su comportamiento, no se puede garantizar su unicidad absoluta mediante Equals comparaciones mediante el método.Because keys can be inherited and their behavior changed, their absolute uniqueness cannot be guaranteed by comparisons using the Equals method.

Notas a los implementadores

La clase de implementación debe tener un medio para comparar claves.The implementing class must have a means to compare keys.

Propiedades

Count

Obtiene el número de elementos incluidos en ICollection<T>.Gets the number of elements contained in the ICollection<T>.

(Heredado de ICollection<T>)
IsReadOnly

Obtiene un valor que indica si ICollection<T> es de solo lectura.Gets a value indicating whether the ICollection<T> is read-only.

(Heredado de ICollection<T>)
Item[TKey]

Obtiene o establece el elemento con la clave especificada.Gets or sets the element with the specified key.

Keys

Obtiene una interfaz ICollection<T> que contiene las claves de la interfaz IDictionary<TKey,TValue>.Gets an ICollection<T> containing the keys of the IDictionary<TKey,TValue>.

Values

Obtiene una interfaz ICollection<T> que contiene los valores de la interfaz IDictionary<TKey,TValue>.Gets an ICollection<T> containing the values in the IDictionary<TKey,TValue>.

Métodos

Add(T)

Agrega un elemento a ICollection<T>.Adds an item to the ICollection<T>.

(Heredado de ICollection<T>)
Add(TKey, TValue)

Agrega un elemento con la clave y el valor proporcionados a IDictionary<TKey,TValue>.Adds an element with the provided key and value to the IDictionary<TKey,TValue>.

Clear()

Quita todos los elementos de ICollection<T>.Removes all items from the ICollection<T>.

(Heredado de ICollection<T>)
Contains(T)

Determina si ICollection<T> contiene un valor específico.Determines whether the ICollection<T> contains a specific value.

(Heredado de ICollection<T>)
ContainsKey(TKey)

Determina si IDictionary<TKey,TValue> contiene un elemento con la clave especificada.Determines whether the IDictionary<TKey,TValue> contains an element with the specified key.

CopyTo(T[], Int32)

Copia los elementos de ICollection<T> en Array, empezando por un índice determinado de Array.Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

(Heredado de ICollection<T>)
GetEnumerator()

Devuelve un enumerador que recorre en iteración una colección.Returns an enumerator that iterates through a collection.

(Heredado de IEnumerable)
Remove(TKey)

Quita el elemento con la clave especificada de IDictionary<TKey,TValue>.Removes the element with the specified key from the IDictionary<TKey,TValue>.

TryGetValue(TKey, TValue)

Obtiene el valor asociado a la clave especificada.Gets the value associated with the specified key.

Métodos de extensión

Remove<TKey,TValue>(IDictionary<TKey,TValue>, TKey, TValue)

Intenta quitar el valor con el elemento key especificado de dictionary.Tries to remove the value with the specified key from the dictionary.

TryAdd<TKey,TValue>(IDictionary<TKey,TValue>, TKey, TValue)

Intenta agregar los elementos key y value especificados a dictionary.Tries to add the specified key and value to the dictionary.

CopyToDataTable<T>(IEnumerable<T>)

Devuelve un objeto DataTable que contiene copias de los objetos DataRow, dado un objeto IEnumerable<T> de entrada donde el parámetro T genérico es DataRow.Returns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

Copia objetos DataRow en el objeto DataTable especificado, dado un objeto IEnumerable<T> de entrada donde el parámetro T genérico es DataRow.Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

Copia objetos DataRow en el objeto DataTable especificado, dado un objeto IEnumerable<T> de entrada donde el parámetro T genérico es DataRow.Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

Convierte los elementos de IEnumerable en el tipo especificado.Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

Filtra los elementos de IEnumerable en función de un tipo especificado.Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

Habilita la paralelización de una consulta.Enables parallelization of a query.

AsQueryable(IEnumerable)

Convierte una interfaz IEnumerable en IQueryable.Converts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>)

Devuelve una colección de elementos que contiene los antecesores de todos los nodos de la colección de origen.Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName)

Devuelve una colección de elementos filtrada que contiene los antecesores de todos los nodos de la colección de origen.Returns a filtered collection of elements that contains the ancestors of every node in the source collection. En la colección sólo se incluyen los elementos que tienen un objeto XName coincidente.Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

Devuelve una colección de los nodos descendientes de todos los documentos y elementos de la colección de origen.Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>)

Devuelve una colección de elementos que contiene los elementos descendientes de todos los elementos y documentos de la colección de origen.Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName)

Devuelve una colección filtrada de elementos que contiene los elementos descendientes de todos los elementos y documentos de la colección de origen.Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. En la colección sólo se incluyen los elementos que tienen un objeto XName coincidente.Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>)

Devuelve una colección de los elementos secundarios de todos los elementos y documentos de la colección de origen.Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName)

Devuelve una colección filtrada de los elementos secundarios de todos los elementos y documentos de la colección de origen.Returns a filtered collection of the child elements of every element and document in the source collection. En la colección sólo se incluyen los elementos que tienen un objeto XName coincidente.Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>)

Devuelve una colección de nodos que contiene todos los nodos de la colección de origen, clasificados por documento.Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>)

Devuelve una colección de los nodos secundarios de todos los documentos y elementos de la colección de origen.Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

Quita todos los nodos de la colección de origen de su nodo primario.Removes every node in the source collection from its parent node.

Se aplica a

Consulte también: