CSharpTest.Net
Values Property
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Collections Namespace > LurchTable<TKey,TValue> Class : Values Property

Glossary Item Box

Gets an ICollection containing the values in the IDictionary.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Values As LurchTable(Of TKey,TValue)
C# 
public LurchTable<TKey,TValue> Values {get;}

Example

Library/Library.Test/TestLurchTable.cs

C#Copy Code
var sample = GetSample();
var items = CreateSample(sample);
IDictionary<int, string> dict = items;
var values = new List<string>();
foreach (var kv in sample)
    values.Add(kv.Value);
VerifyCollection(EqualityComparer<string>.Default, values.AsReadOnly(), items.Values);
VerifyCollection(EqualityComparer<string>.Default, values.AsReadOnly(), dict.Values);
VB.NETCopy Code
Dim sample As var = GetSample()
Dim items As var = CreateSample(sample)
Dim dict As IDictionary(Of Integer, String) = items
Dim values As var = New List(Of String)()
For Each kv As var In sample
    values.Add(kv.Value)
Next
VerifyCollection(EqualityComparer(Of String).[Default], values.AsReadOnly(), items.Values)
VerifyCollection(EqualityComparer(Of String).[Default], values.AsReadOnly(), dict.Values)

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys