[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Type Parameters

TKey
TValue

A generic dictionary, which allows its keys to be garbage collected if there are no other references to them than from the dictionary itself.

The following tables list the members exposed by the WeakDictionary<(Of TKey, TValue>) generic type.

Public Methods

  NameDescription
AddOverloaded.
Clear
Removes all items from the ICollection<(Of T>).

Contains
Determines whether the ICollection<(Of T>) contains a specific value.

ContainsKey
Determines whether the IDictionary<(Of TKey, TValue>) contains an element with the specified key.

CopyTo
Copies the elements of the ICollection<(Of T>) to an Array, Starting at a particular Array index.

Equals (Inherited from Object.)
GetEnumerator
Returns an enumerator that iterates through the collection.

GetHashCode (Inherited from Object.)
GetType (Inherited from Object.)
RemoveOverloaded.
RemoveCollectedEntries
Removes the left-over weak references for entries in the dictionary whose key or value has already been reclaimed by the garbage collector. This will reduce the dictionary's Count by the number of dead key-value pairs that were eliminated.

ToString (Inherited from Object.)
TryGetValue
Tries the get value.

Protected Methods

  NameDescription
Finalize (Inherited from Object.)
MemberwiseClone (Inherited from Object.)

Public Constructors

  NameDescription
WeakDictionary<(Of TKey, TValue>)NewOverloaded.

Public Properties

  NameDescription
Count
Gets the number of elements contained in the ICollection<(Of T>).

IsReadOnly
Gets a value indicating whether the ICollection<(Of T>) is read-only.

Item
Gets or sets the !:TValue with the specified key.

Keys
Gets an ICollection<(Of T>) containing the keys of the IDictionary<(Of TKey, TValue>).

KeysEnum
Gets an enumerator that enumerates the keys.

Values
Gets an ICollection<(Of T>) containing the values in the IDictionary<(Of TKey, TValue>).

Explicit Interface Implementations

  NameDescription
Explicit interface implemetationIEnumerable.System.Collections.IEnumerable.GetEnumerator
Returns an enumerator that iterates through a collection.