# DataStoreVirtualCollection<T> class

Namespace: [Eto.Forms](https://eto.picoe.ca/api/namespace/eto.forms.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
public class DataStoreVirtualCollection<T> : IList<T>, IList
```

Translates an [IDataStore<T>](https://eto.picoe.ca/api/type/eto.forms.idatastore-1.md) to a read-only [IList<T>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1)

**Remarks:** This is typically used to pass the data store to controls that require a standard collection

**Type parameters:**

- `T`

## Constructors

- [DataStoreVirtualCollection<T>](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/ctor.md): Initializes a new instance of the [DataStoreVirtualCollection<T>](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1.md) class.

## Properties

- [Count](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/count.md): Gets the count of items in this collection
- [IsFixedSize](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/isfixedsize.md): Gets a value indicating whether this instance is fixed size.
- [IsReadOnly](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/isreadonly.md): Gets a value indicating whether this instance is read only.
- [IsSynchronized](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/issynchronized.md): Gets a value indicating whether this instance is synchronized.
- [SyncRoot](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/syncroot.md): Gets the sync root.

## Indexers

- [IList.this[]](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/system-collections-ilist-this.md)
- [this[]](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/item.md): Gets or sets the item at the specified index. This collection is read-only so setting the item throws an exception.

## Methods

- [Add](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/add.md): (2 overloads) Adds an item to the current collection.
- [Clear](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/clear.md): Clears all items from the collection. This collection is read-only so this throws an exception.
- [Contains](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/contains.md): (2 overloads) Determines whether the current collection contains a specific value.
- [CopyTo](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/copyto.md): (2 overloads) Copies the contents of the collection to the specified array starting at the specified index
- [GetEnumerator](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/getenumerator.md): Gets the enumerator for the collection
- [IndexOf](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/indexof.md): (2 overloads) Determines the index of a specific item in the current instance.
- [Insert](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/insert.md): (2 overloads) Insert a value into the collection with the specified index
- [Remove](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/remove.md): (2 overloads) Remove the specified item. This collection is read-only so this throws an exception.
- [RemoveAt](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/removeat.md): Removes the item at the specified index. This collection is read-only so this throws an exception.
- [IEnumerable.GetEnumerator](https://eto.picoe.ca/api/type/eto.forms.datastorevirtualcollection-1/system-collections-ienumerable-getenumerator.md)
