Table of Contents

Class ReplaceInList

Namespace
NanoByte.Common.Undo
Assembly
NanoByte.Common.dll

Factory methods for ReplaceInList<T>.

public static class ReplaceInList
Inheritance
ReplaceInList

Methods

For<T>(IList<T>, T, T)

Creates a new replace in list command.

public static ReplaceInList<T> For<T>(IList<T> list, T oldElement, T newElement) where T : notnull

Parameters

list IList<T>

The collection to be modified.

oldElement T

The element to be removed from list.

newElement T

The element to be added to list.

Returns

ReplaceInList<T>

Type Parameters

T

The type of elements the list contains.