# FeatureCollection Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.featurecollection/)

## Get {#get-1-9e5bbd54}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.featurecollection/methods/get-1-9e5bbd54/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Core/Networking/Transport/FeatureCollection.cs#L115)

```csharp
public TFeature? Get<TFeature>()
```

Retrieves the requested feature from the collection.

### Returns

The requested feature, or null if it is not present.

## GetEnumerator {#getenumerator-397ca04f}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.featurecollection/methods/getenumerator-397ca04f/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Core/Networking/Transport/FeatureCollection.cs#L96-L112)

```csharp
public IEnumerator<KeyValuePair<Type, object>> GetEnumerator()
```

Returns an enumerator that iterates through the collection.

### Returns

An enumerator that can be used to iterate through the collection.

## Set(TFeature?) {#set-1-tfeature-nullable-bc9fcb97}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.connections.transport.featurecollection/methods/set-1-tfeature-nullable-bc9fcb97/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Core/Networking/Transport/FeatureCollection.cs#L118)

```csharp
public void Set<TFeature>(TFeature? instance)
```

Sets the given feature in the collection.

### Parameters

- `instance` (`TFeature?`): The feature value.
