IConfiguration.GetSection(String) Methode

Definitie

Hiermee haalt u een subsectie van de configuratie op met de opgegeven sleutel.

public:
 Microsoft::Extensions::Configuration::IConfigurationSection ^ GetSection(System::String ^ key);
public Microsoft.Extensions.Configuration.IConfigurationSection GetSection(string key);
abstract member GetSection : string -> Microsoft.Extensions.Configuration.IConfigurationSection
Public Function GetSection (key As String) As IConfigurationSection

Parameters

key
String

De sleutel van de configuratiesectie.

Retouren

De IConfigurationSection.

Opmerkingen

Deze methode retourneert nooit null. Als er geen overeenkomende subsectie wordt gevonden met de opgegeven sleutel, wordt een lege IConfigurationSection waarde geretourneerd.

Van toepassing op