Remove Method
Collapse the table of content
Expand the table of content

ConditionalWeakTable(Of TKey, TValue).Remove Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Removes a key and its value from the table.

Namespace:  System.Runtime.CompilerServices
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public Function Remove ( _
	key As TKey _
) As Boolean

Parameters

key
Type: TKey
The key to remove.

Return Value

Type: System.Boolean
true if the key is found and removed; otherwise, false.

ExceptionCondition
ArgumentNullException

key is Nothing.

If the key is garbage-collected during this operation, the method does not raise an exception and the return value is undefined.

Windows Phone OS

Supported in: 8.1, 8.0

  • SecurityCriticalAttribute 

    requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Show:
© 2017 Microsoft