WeakRefDictionary<TKey, TValue>.Item Property
Retired Content |
---|
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The latest Unity Application Block information can be found at the Unity Application Block site. |
Retrieves a value from the dictionary.
Namespace: Microsoft.Practices.ObjectBuilder2
Assembly: Microsoft.Practices.ObjectBuilder2 (in Microsoft.Practices.ObjectBuilder2.dll)
'Declaration
Public ReadOnly Property Item ( _
key As TKey _
) As TValue
public TValue Item[
TKey key
] { get; }
public:
property TValue Item[TKey key] {
TValue get (TKey key);
}
JScript does not support indexed properties.
- key
Type: TKey
The key to look for.
The value in the dictionary.
Exception | Condition |
---|---|
System.Collections.Generic.KeyNotFoundException | Thrown when the key does exist in the dictionary. Since the dictionary contains weak references, the key may have been removed by the garbage collection of the object. |