Bagikan melalui


ImmutableList<T>.IImmutableList<T>.Replace Metode

Definisi

Mengganti elemen dalam daftar dengan elemen yang ditentukan.

 virtual System::Collections::Immutable::IImmutableList<T> ^ System.Collections.Immutable.IImmutableList<T>.Replace(T oldValue, T newValue, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer) = System::Collections::Immutable::IImmutableList<T>::Replace;
System.Collections.Immutable.IImmutableList<T> IImmutableList<T>.Replace (T oldValue, T newValue, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
abstract member System.Collections.Immutable.IImmutableList<T>.Replace : 'T * 'T * System.Collections.Generic.IEqualityComparer<'T> -> System.Collections.Immutable.IImmutableList<'T>
override this.System.Collections.Immutable.IImmutableList<T>.Replace : 'T * 'T * System.Collections.Generic.IEqualityComparer<'T> -> System.Collections.Immutable.IImmutableList<'T>
Function Replace (oldValue As T, newValue As T, equalityComparer As IEqualityComparer(Of T)) As IImmutableList(Of T) Implements IImmutableList(Of T).Replace

Parameter

oldValue
T

Elemen yang akan diganti.

newValue
T

Elemen untuk mengganti elemen lama dengan.

equalityComparer
IEqualityComparer<T>

Perbandingan kesetaraan untuk digunakan dalam pencarian.

Mengembalikan

Daftar baru.

Penerapan

Pengecualian

oldValue tidak ada dalam daftar.

Berlaku untuk