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

Glossary Item Box

Gets an ICollection containing the keys of the IDictionary.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Keys As ICollection(Of TKey)
C# 
public ICollection<TKey> Keys {get;}

Example

Library/Library.Test/TestSynchronizedCollections.cs

C#Copy Code
SynchronizedDictionary<string, string> test = new SynchronizedDictionary<string, string>(new Dictionary<string,string>(), new IgnoreLocking());
test["a"] = "b";
string all = String.Join("", new List<string>(test.Keys).ToArray());
Assert.AreEqual("a", all);
VB.NETCopy Code
Dim test As New SynchronizedDictionary(Of String, String)(New Dictionary(Of String, String)(), New IgnoreLocking())
test("a") = "b"
Dim all As String = [String].Join("", New List(Of String)(test.Keys).ToArray())
Assert.AreEqual("a", all)

Requirements

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

See Also

Generated with Document! X 2011 by Innovasys