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

# Class ObservableKeyedCollectionBase<TKey, TItem>

Namespace: [VM.Collections](https://developer.synopsys.com/docs/motion/motion-standalone-postprocessor-c-sharp-library/2025-r1/lib/VM.Collections)\
Assembly: VM.dll

```csharp theme={null}
public abstract class ObservableKeyedCollectionBase<TKey, TItem> : KeyedCollection<TKey, TItem>
```

#### Type Parameters

`TKey`

`TItem`

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[Collection\<TItem>](https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.collection-1) ←
[KeyedCollection\<TKey, TItem>](https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.keyedcollection-2) ←
[ObservableKeyedCollectionBase\<TKey, TItem>](https://developer.synopsys.com/docs/motion/motion-standalone-postprocessor-c-sharp-library/2025-r1/lib/VM.Collections.ObservableKeyedCollectionBase-2.md)

## Constructors

### ObservableKeyedCollectionBase()

```csharp theme={null}
protected ObservableKeyedCollectionBase()
```

## Methods

### \<>OnPropertyChanged(PropertyChangedEventArgs)

```csharp theme={null}
protected void <>OnPropertyChanged(PropertyChangedEventArgs eventArgs)
```

#### Parameters

`eventArgs` [PropertyChangedEventArgs](https://learn.microsoft.com/dotnet/api/system.componentmodel.propertychangedeventargs)

### AddRange(IEnumerable\<TItem>)

```csharp theme={null}
public void AddRange(IEnumerable<TItem> items)
```

#### Parameters

`items` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<TItem>

### ClearItems()

```csharp theme={null}
protected override void ClearItems()
```

### InsertItem(int, TItem)

```csharp theme={null}
protected override void InsertItem(int index, TItem item)
```

#### Parameters

`index` [int](https://learn.microsoft.com/dotnet/api/system.int32)

`item` TItem

### OnCollectionChanged(NotifyCollectionChangedEventArgs)

```csharp theme={null}
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
```

#### Parameters

`e` [NotifyCollectionChangedEventArgs](https://learn.microsoft.com/dotnet/api/system.collections.specialized.notifycollectionchangedeventargs)

### RemoveItem(int)

```csharp theme={null}
protected override void RemoveItem(int index)
```

#### Parameters

`index` [int](https://learn.microsoft.com/dotnet/api/system.int32)

### SetItem(int, TItem)

```csharp theme={null}
protected override void SetItem(int index, TItem newitem)
```

#### Parameters

`index` [int](https://learn.microsoft.com/dotnet/api/system.int32)

`newitem` TItem

### TryGetValue(TKey, out TItem)

```csharp theme={null}
public bool TryGetValue(TKey key, out TItem item)
```

#### Parameters

`key` TKey

`item` TItem

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### CollectionChanged

```csharp theme={null}
public event NotifyCollectionChangedEventHandler CollectionChanged
```

#### Event Type

[NotifyCollectionChangedEventHandler](https://learn.microsoft.com/dotnet/api/system.collections.specialized.notifycollectionchangedeventhandler)

### PropertyChanged

```csharp theme={null}
public event PropertyChangedEventHandler PropertyChanged
```

#### Event Type

[PropertyChangedEventHandler](https://learn.microsoft.com/dotnet/api/system.componentmodel.propertychangedeventhandler)
