Skip to content

ObservableCollection.splice

Andrei Fangli edited this page Sep 3, 2023 · 3 revisions
API / ObservableCollection<TItem> / splice method

Removes and/or adds elements to the collection and returns the deleted elements.

This is a public method.

public splice(start: number, deleteCount?: number, ...items: readonly TItem[]): TItem[]

Parameters

  • start: Number, the zero-based location in the collection from which to start removing elements.
  • deleteCount: Number, optional, the number of elements to remove.
  • items: readonly TItem[], optional, the items to insert at the given start location.

Returns: TItem[]

An array containing the elements that were deleted.

See

Clone this wiki locally