IDictionary<TKey,TValue>.Values 속성

정의

ICollection<T>의 값이 들어 있는 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)

속성 값

ICollection<TValue>

ICollection<T>를 구현하는 개체의 값을 포함하는 IDictionary<TKey,TValue>입니다.

예제

다음 코드 예제에서는 사용 하 여 값만 열거 하는 방법을 보여 줌 속성 Values 입니다.

이 코드는 컴파일 및 실행할 수 있는 더 큰 예제의 일부입니다. 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

설명

반환 ICollection<T> 된 값의 순서는 지정되지 않지만 속성에서 반환 Keys 된 의 해당 키 ICollection<T> 와 동일한 순서로 보장됩니다.

적용 대상

추가 정보