Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ImmutableList<T>.IImmutableList<T>.Replace Method

.NET Framework 4.5

Replaces an element in the list with the specified element.

Namespace:  System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)
IImmutableList<T> IImmutableList<T>.Replace(
	T oldValue,
	T newValue,
	IEqualityComparer<T> equalityComparer
)

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.

Return Value

Type: System.Collections.Immutable.IImmutableList<T>
The new list.

Implements

IImmutableList<T>.Replace(T, T, IEqualityComparer<T>)
ExceptionCondition
ArgumentException

Thrown when the old value does not exist in the list.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.