PropertyCollection.Exchange<T>(Object, T) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Replaces the entry associated with key
with value, returning the old value (or default(T)). This is done as a thread-safe/atomic operation.
public T Exchange<T> (object key, T value);
member this.Exchange : obj * 'T -> 'T
Public Function Exchange(Of T) (key As Object, value As T) As T
Type Parameters
- T
Parameters
- key
- Object
- value
- T
Returns
T
The original entry associated with key
or default(T
) if there was no value associated with the key
.