Skip to content

Commit

Permalink
Update configuration-system.md
Browse files Browse the repository at this point in the history
  • Loading branch information
skrysmanski authored Mar 17, 2024
1 parent 0b91b85 commit 1177077
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions content/articles/dotnet/configuration-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ IConfiguration config = ...
int value = config.GetValue<int>("Parent:FavoriteNumber");
```

*Note:* `GetValue<T>()` is an extension method from the [Microsoft.Extensions.Configuration.Binder](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Binder/) NuGet package.

Alternatively you can bind whole **configuration sections** (see below) to objects.

For example, with this configuration:
Expand Down

0 comments on commit 1177077

Please sign in to comment.