# NamedOptionExtensions Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.namedoptionextensions/)

## GetOptionsByName(IServiceProvider, string) {#getoptionsbyname-1-this-system-iserviceprovider-string-4da4db2c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.namedoptionextensions/methods/getoptionsbyname-1-this-system-iserviceprovider-string-4da4db2c/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core/Utils/NamedOptionExtension.cs#L22)

```csharp
public static TOption GetOptionsByName<TOption>(this IServiceProvider services, string name)
```

Gets a named options instance.

### Parameters

- `services` (`IServiceProvider`): The services.
- `name` (`string`): The name.

### Returns

TOption.
