The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

ListEx.

ReplaceOrAdd<T>(IList<T>, T, T) Method

Summary

Replaces the item if found, otherwise the item is added to the list.
Namespace
DynamicData
Containing Type
ListEx

Syntax

public static void ReplaceOrAdd<T>(this IList<T> source, T original, T replaceWith)

Type Parameters

Name Description
T The type of the item.

Parameters

Name Type Description
source IList<T> The source.
original T The original.
replaceWith T The value to replace with.

Return Value

Type Description
void