PostSharpAPI ReferencePost­Sharp.​Patterns.​CollectionsAdvisable­Collection<T>Set­Item
Open sandboxFocus

AdvisableCollection<T>.SetItem Method

SetItem(Int32, T)

Replaces the element at the specified index of the underlying collection.

protected virtual void SetItem(int index, T item)
Type Name Description
Int32 index

The zero-based index of the element to replace.

T item

The new value for the element at the specified index. The value can be null for reference types.



This method does not cause the advices to be executed. It should be invoked only from inside the scope of the ExecuteWithAdvices method.