# IndexedCollectionPropertyBag<TList, TElement>

> An IPropertyBag<TContainer> implementation for a generic collection of elements which can be accessed by index. This is based on the IList_1 interface.

## Definition

* **Type:** Class
* **Namespace:** [Unity.Properties](/engine/6000.6/script-reference/unity/properties.md)
* **Assembly:** UnityEngine.PropertiesModule
* **Inherits from:** [PropertyBag\<T>](/engine/6000.6/script-reference/unity/properties/propertybag1.md)
* **Implements:** [IListPropertyBag\<T, T>](/engine/6000.6/script-reference/unity/properties/ilistpropertybag2.md), [ICollectionPropertyBag\<T, T>](/engine/6000.6/script-reference/unity/properties/icollectionpropertybag2.md), [IPropertyBag\<T>](/engine/6000.6/script-reference/unity/properties/ipropertybag1.md), [IPropertyBag](/engine/6000.6/script-reference/unity/properties/ipropertybag.md), [ICollectionPropertyBagAccept\<T>](/engine/6000.6/script-reference/unity/properties/icollectionpropertybagaccept1.md), [IListPropertyBagAccept\<T>](/engine/6000.6/script-reference/unity/properties/ilistpropertybagaccept1.md), [IListPropertyAccept\<T>](/engine/6000.6/script-reference/unity/properties/ilistpropertyaccept1.md), [IIndexedProperties\<T>](/engine/6000.6/script-reference/unity/properties/iindexedproperties1.md)

```csharp
public class IndexedCollectionPropertyBag<TList, TElement> : PropertyBag<TList>, IListPropertyBag<TList, TElement>, ICollectionPropertyBag<TList, TElement>, IPropertyBag<TList>, IPropertyBag, ICollectionPropertyBagAccept<TList>, IListPropertyBagAccept<TList>, IListPropertyAccept<TList>, IIndexedProperties<TList> where TList : IList<TElement>
```

## Methods

| Method                                                                                                                         | Description                                                                                           |
| ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| [InstantiateWithCount](/engine/6000.6/script-reference/unity/properties/indexedcollectionpropertybag2/instantiatewithcount.md) | Implement this method to provide custom type instantiation with a count value for the container type. |
| [TryGetProperty](/engine/6000.6/script-reference/unity/properties/indexedcollectionpropertybag2/trygetproperty.md)             | Gets the property associated with the specified index.                                                |

## Inheritance

**Inherited Members:**

* [PropertyBag\<T>.Accept(ITypeVisitor)](/engine/6000.6/script-reference/unity/properties/propertybag1/accept.md)
* [PropertyBag\<T>.GetProperties()](/engine/6000.6/script-reference/unity/properties/propertybag1/getproperties.md)
* [PropertyBag\<T>.GetProperties(T)](/engine/6000.6/script-reference/unity/properties/propertybag1/getproperties.md)
* [PropertyBag\<T>.Instantiate()](/engine/6000.6/script-reference/unity/properties/propertybag1/instantiate.md)
* [PropertyBag\<T>.CreateInstance()](/engine/6000.6/script-reference/unity/properties/propertybag1/createinstance.md)
* [PropertyBag\<T>.TryCreateInstance(T)](/engine/6000.6/script-reference/unity/properties/propertybag1/trycreateinstance.md)
* [PropertyBag\<T>.InstantiationKind()](/engine/6000.6/script-reference/unity/properties/propertybag1/instantiationkind.md)
