# NamedOptionExtensions.GetOptionsByName(IServiceProvider, string)

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

[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.
