Method OnItemInserted
OnItemInserted(object?, int, T)
Invoked after an item has been inserted into the collection.
protected virtual void OnItemInserted(object? sender, int index, T item)
Parameters
senderobjectThe source of the event, typically the collection that triggered the insertion.
indexintThe zero-based index at which the item was inserted.
itemTThe item that was inserted into the collection.
Remarks
This method is called to notify derived classes of an item insertion. Subclasses can override this method to perform custom logic in response to the insertion.