Skip to content

Applies to

net11.0, net10.0, net47, net471, net472, net48, net481

public void Edit(Action<ICollection<T>> editAction)

View source (opens in a new tab)

Summary: Performs a batch edit operation on the collection, ensuring only a single change notification is emitted.

Parameters

NameTypeDescription
editActionAction> (opens in a new tab)An action that receives an editable list interface to perform modifications.

Remarks

The action runs while every shard is write-locked, so it must not call back into the list. If it throws, the edits made so far stay applied, the count and indexes are updated, and the notification is still emitted.

Exceptions

TypeCondition
System.ArgumentNullException (opens in a new tab)editAction is null.