ImmutableList<T>.SetItem Method (Int32, T)

 

Replaces an element at a given position in the immutable list with the specified element.

Namespace:   System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

public ImmutableList<T> SetItem(
	int index,
	T value
)

Parameters

index
Type: System.Int32

The position in the list of the element to replace.

value
Type: T

The element to replace the old element with.

Return Value

Type: System.Collections.Immutable.ImmutableList<T>

The new list with the replaced element, even if it is equal to the old element at that position.

Return to top
Show: