Class ReplaceInList
Factory methods for ReplaceInList<T>.
Namespace: NanoByte.Common.Undo
Assembly: NanoByte.Common.dll
Syntax
public static class ReplaceInList : Object
Methods
For<T>(IList<T>, T, T)
Creates a new replace in list command.
Declaration
public static ReplaceInList<T> For<T>(IList<T> list, T oldElement, T newElement)
Parameters
Type | Name | Description |
---|---|---|
IList<T> | list | The collection to be modified. |
T | oldElement | The element to be removed from |
T | newElement | The element to be added to |
Returns
Type | Description |
---|---|
ReplaceInList<T> |
Type Parameters
Name | Description |
---|---|
T | The type of elements the list contains. |