# TypeCache.FieldInfoCollection

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

## Definition

* **Type:** Struct
* **Namespace:** [UnityEditor](/engine/6000.5/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule
* **Implements:** [IList\<FieldInfo>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1), [ICollection\<FieldInfo>](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1), [IEnumerable\<FieldInfo>](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.FieldInfoCollection : IList<FieldInfo>, ICollection<FieldInfo>, IEnumerable<FieldInfo>, IList, ICollection, IEnumerable
```

## Remarks

**Note:** The collection is immutable for the duration of Unity domain lifecycle. All *IList* methods that might alter the collection always throw *NotSupportedException*.

## Properties

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

## Methods

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

## Structs

| Struct                                                                                                                             | Description                                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| [TypeCache.FieldInfoCollection.Enumerator](/engine/6000.5/script-reference/unityeditor/typecache/fieldinfocollectionenumerator.md) | Enumerates the elements of a *[TypeCache.FieldInfoCollection](/engine/6000.5/script-reference/unityeditor/typecache/fieldinfocollection.md)*. |
