IDictionary<TKey,TValue>.Values Propriedade

Definição

Obtém um ICollection<T> que contém os valores no IDictionary<TKey,TValue>.Gets an ICollection<T> containing the values in the IDictionary<TKey,TValue>.

public:
 property System::Collections::Generic::ICollection<TValue> ^ Values { System::Collections::Generic::ICollection<TValue> ^ get(); };
public System.Collections.Generic.ICollection<TValue> Values { get; }
member this.Values : System.Collections.Generic.ICollection<'Value>
Public ReadOnly Property Values As ICollection(Of TValue)

Valor da propriedade

ICollection<TValue>

Um ICollection<T> que contém os valores no objeto que implementa IDictionary<TKey,TValue>.An ICollection<T> containing the values in the object that implements IDictionary<TKey,TValue>.

Exemplos

O exemplo de código a seguir mostra como enumerar valores sozinhos usando a propriedade Values.The following code example shows how to enumerate values alone using the Values property.

Esse código é parte de um exemplo maior que pode ser compilado e executado.This code is part of a larger example that can be compiled and executed. Consulte System.Collections.Generic.IDictionary<TKey,TValue>.See System.Collections.Generic.IDictionary<TKey,TValue>.

// 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 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 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

Comentários

A ordem dos valores no ICollection<T> retornado não é especificada, mas é garantido que seja a mesma ordem das chaves correspondentes no ICollection<T> retornado pela propriedade Keys.The order of the values in the returned ICollection<T> is unspecified, but it is guaranteed to be the same order as the corresponding keys in the ICollection<T> returned by the Keys property.

Aplica-se a

Veja também