The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
ImmutableList<T>::Replace Method (T, T)
Replaces the specified element in the immutable list with a new element.
Assembly: System.Collections.Immutable (in System.Collections.Immutable.dll)
Parameters
- oldValue
-
Type:
T
The element to replace.
- newValue
-
Type:
T
The element to replace oldValue with.
Return Value
Type: System.Collections.Immutable::ImmutableList<T>^The new list with the replaced element, even if it is equal to the old element.
| Exception | Condition |
|---|---|
| ArgumentException | oldValue does not exist in the immutable list. |
Show: