# TypeCache.TypeCollection

> Represents a read-only collection of Type and implements an IList interface.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor
* **Implements:** [IList\<Type>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1), [ICollection\<Type>](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1), [IEnumerable\<Type>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1), [IList](https://learn.microsoft.com/dotnet/api/system.collections.ilist), [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.icollection), [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.ienumerable)

```csharp
public struct TypeCache.TypeCollection : IList<Type>, ICollection<Type>, IEnumerable<Type>, IList, ICollection, IEnumerable
```

## Remarks

**Note:** All *IList* methods which might alter the collection always throw *NotSupportedException*.

## Properties

| Property                                                                                                 | Description                                                                                                                                                                |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Count](/engine/6000.0/script-reference/unityeditor/typecache/typecollection/count.md)                   | The number of elements in [TypeCache.TypeCollection](/engine/6000.0/script-reference/unityeditor/typecache/typecollection.md).                                             |
| [IsFixedSize](/engine/6000.0/script-reference/unityeditor/typecache/typecollection/isfixedsize.md)       | Whether the [TypeCache.TypeCollection](/engine/6000.0/script-reference/unityeditor/typecache/typecollection.md) is of a fixed size. This property is always set to *true*. |
| [IsReadOnly](/engine/6000.0/script-reference/unityeditor/typecache/typecollection/isreadonly.md)         | Whether the [TypeCache.TypeCollection](/engine/6000.0/script-reference/unityeditor/typecache/typecollection.md) is read-only. This property is always set to *true*.       |
| [IsSynchronized](/engine/6000.0/script-reference/unityeditor/typecache/typecollection/issynchronized.md) | Whether the [TypeCache.TypeCollection](/engine/6000.0/script-reference/unityeditor/typecache/typecollection.md) is synchronized. This property is always set to *true*.    |
| [this\[\]](/engine/6000.0/script-reference/unityeditor/typecache/typecollection/item.md)                 | Gets the element at the specified index.                                                                                                                                   |

## Methods

| Method                                                                                                 | Description                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Contains](/engine/6000.0/script-reference/unityeditor/typecache/typecollection/contains.md)           | Determines whether an element is in the [TypeCache.TypeCollection](/engine/6000.0/script-reference/unityeditor/typecache/typecollection.md).      |
| [CopyTo](/engine/6000.0/script-reference/unityeditor/typecache/typecollection/copyto.md)               | Copies the collection to an array.                                                                                                                |
| [GetEnumerator](/engine/6000.0/script-reference/unityeditor/typecache/typecollection/getenumerator.md) | Gets an enumerator that iterates through the [TypeCache.TypeCollection](/engine/6000.0/script-reference/unityeditor/typecache/typecollection.md). |
| [IndexOf](/engine/6000.0/script-reference/unityeditor/typecache/typecollection/indexof.md)             | Gets the first occurrence of an item in the [TypeCache.TypeCollection](/engine/6000.0/script-reference/unityeditor/typecache/typecollection.md).  |

## Structs

| Struct                                                                                                                   | Description                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
| [TypeCache.TypeCollection.Enumerator](/engine/6000.0/script-reference/unityeditor/typecache/typecollectionenumerator.md) | Enumerates the elements of a [TypeCache.TypeCollection](/engine/6000.0/script-reference/unityeditor/typecache/typecollection.md). |
