> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OnCollectionChanged Method of the ICollectionEvents Interface

This method is implemented on the client side. It is called by ABBYY FlexiCapture SDK for some of the methods of the collection objects. It delivers to the client information about adding, deleting and modifying of collection elements.

## Syntax

```vb Visual Basic .NET theme={null}
Sub OnCollectionChanged( _
  ByVal Reloaded As Boolean, _
  ByVal AddedItems As IntsCollection, _
  ByVal DeletedItems As IntsCollection, _
  ByVal ModifiedItems As IntsCollection _
)
```

```cpp C++ theme={null}
HRESULT OnCollectionChanged(
  VARIANT_BOOL      Reloaded,
  IIntsCollection* AddedItems,
  IIntsCollection* DeletedItems,
  IIntsCollection* ModifiedItems
);
```

## Parameters

**Reloaded**

\[in] This parameter specifies whether the collection has been reloaded.

**AddedItems**

\[in] This parameter refers to the collection of identifiers of the elements which have been added.

**DeletedItems**

\[in] This parameter contains the collection of identifiers of the elements which have been deleted.

**ModifiedItems**

\[in] This parameter contains the collection of identifiers of the elements which have been modified.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## Remarks

A client implementation of this method must assure that all exceptions thrown inside the method are caught and handled and no exceptions are propagated outside the method. Propagation of an exception outside the method may lead to unpredictable results (such as program termination).

## See also

[**ICollectionEvents**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/icollectionevents.md)

[Working with Connectable Objects](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/connectableobjects.md)

[Working with Collections](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/collections.md)
