Method Replace
- Namespace
- GuildWars2.Collections
- Assembly
- GuildWars2.dll
Replace(T, T, IEqualityComparer<T>?)
Creates a new ImmutableValueList<T> with the first occurrence of the specified value replaced with a new value.
public ImmutableValueList<T> Replace(T oldValue, T newValue, IEqualityComparer<T>? equalityComparer)
Parameters
oldValueTThe value to be replaced.
newValueTThe value to replace the first occurrence of
oldValue.equalityComparerIEqualityComparer<T>The equality comparer to use to locate
oldValue, ornullto use the default comparer.
Returns
- ImmutableValueList<T>
A new list with the value replaced.