# PropertyCollection<TContainer>

> The PropertyCollection<TContainer> struct provides enumerable access to all IProperty<TContainer> for a given PropertyBag<TContainer>.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Properties](/engine/6000.7/script-reference/unity/properties.md)
* **Assembly:** UnityEngine.PropertiesModule
* **Implements:** [IEnumerable\<IProperty\<T>>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1), [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.ienumerable)

```csharp
public readonly struct PropertyCollection<TContainer> : IEnumerable<IProperty<TContainer>>, IEnumerable
```

## Constructors

| Constructor                                                                                                                                                                                                                  | Description                                                                                                                                                                                |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [PropertyCollection\`1(System.Collections.Generic.IEnumerable\{Unity.Properties.IProperty\{\`0}})](/engine/6000.7/script-reference/unity/properties/propertycollection1/ctor.md#propertycollection\(ienumerableipropertyt\)) | Initializes a new instance of the [PropertyCollection\<TContainer>](/engine/6000.7/script-reference/unity/properties/propertycollection1.md) struct which wraps the given enumerable.      |
| [PropertyCollection\`1(System.Collections.Generic.List\{Unity.Properties.IProperty\{\`0}})](/engine/6000.7/script-reference/unity/properties/propertycollection1/ctor.md#propertycollection\(listipropertyt\))               | Initializes a new instance of the [PropertyCollection\<TContainer>](/engine/6000.7/script-reference/unity/properties/propertycollection1.md) struct which wraps the given properties list. |

## Static Properties

| Property                                                                               | Description                                |
| -------------------------------------------------------------------------------------- | ------------------------------------------ |
| [Empty](/engine/6000.7/script-reference/unity/properties/propertycollection1/empty.md) | Returns an empty collection of properties. |

## Methods

| Method                                                                                                 | Description                                                 |
| ------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------- |
| [GetEnumerator](/engine/6000.7/script-reference/unity/properties/propertycollection1/getenumerator.md) | Returns an enumerator that iterates through the collection. |

## Structs

| Struct                                                                                                                           | Description                                                                  |
| -------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [PropertyCollection\<TContainer>.Enumerator](/engine/6000.7/script-reference/unity/properties/propertycollection1/enumerator.md) | An enumerator struct to enumerate all properties for the given `TContainer`. |
