[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
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
GetEnumerator
Returns an enumerator that iterates through the collection.

GetHashCode
Serves as a hash function for a particular type. GetHashCode() is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from Object.)
GetType
Gets the Type of the current instance.
(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
Returns a String that represents the current Object.
(Inherited from Object.)
TryGetValue
Tries the get value.

Protected Methods

  NameDescription
Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)

Explicit Interface Implementations

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