IConfiguration.GetSection(String) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient une sous-section de configuration avec la clé spécifiée.
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
Paramètres
- key
- String
Clé de la section de configuration.
Retours
Remarques
Cette méthode ne retournera null
jamais . Si aucune sous-section correspondante n’est trouvée avec la clé spécifiée, un vide IConfigurationSection est retourné.
Vous pouvez atteindre une sous-sous-section en passant « section1 :section2 :section. » pour key
.
S’applique à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de l’année 2024, nous abandonnerons progressivement le mécanisme de retour d’information GitHub Issues pour le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez :Soumettre et afficher des commentaires pour