Table of Contents

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

oldValue T

The value to be replaced.

newValue T

The value to replace the first occurrence of oldValue.

equalityComparer IEqualityComparer<T>

The equality comparer to use to locate oldValue, or null to use the default comparer.

Returns

ImmutableValueList<T>

A new list with the value replaced.