[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
Name | Description | |
---|---|---|
![]() | Add | Overloaded. |
![]() | 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 | |
![]() | Equals | (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.) |
![]() | Remove | Overloaded. |
![]() | 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
Name | Description | |
---|---|---|
![]() | 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.) |
Public Constructors
Name | Description | |
---|---|---|
![]() | WeakDictionary<(Of TKey, TValue>)New | Overloaded. |
Public Properties
Name | Description | |
---|---|---|
![]() | 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
Name | Description | |
---|---|---|
![]() ![]() | IEnumerable.System.Collections.IEnumerable.GetEnumerator |
Returns an enumerator that iterates through a collection.
|