ImmutableList<T>::IImmutableList<T>::Replace Method (T, T, IEqualityComparer<T>^)
Replaces an element in the list with the specified element.
Assembly: System.Collections.Immutable (in System.Collections.Immutable.dll)
private: virtual IImmutableList<T>^ Replace( T oldValue, T newValue, IEqualityComparer<T>^ equalityComparer ) sealed = IImmutableList<T>::Replace
Parameters
- oldValue
-
Type:
T
The element to replace.
- newValue
-
Type:
T
The element to replace the old element with.
- equalityComparer
-
Type:
System.Collections.Generic::IEqualityComparer<T>^
The equality comparer to use in the search.
| Exception | Condition |
|---|---|
| ArgumentException | Thrown when the old value does not exist in the list. |
Show: