ImmutableArray<T>::Replace Method (T, T)
Finds the first element in the array equal to the specified value and replaces the value with the specified new value.
Assembly: System.Collections.Immutable (in System.Collections.Immutable.dll)
Parameters
- oldValue
-
Type:
T
The value to find and replace in the array.
- newValue
-
Type:
T
The value to replace the oldvalue with.
Return Value
Type: System.Collections.Immutable::ImmutableArray<T>A new array that contains newValue even if the new and old values are the same.
| Exception | Condition |
|---|---|
| ArgumentException | oldValue is not found in the array. |
Show: