SectionInformation.GetParentSection Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the configuration section that contains the configuration section associated with this object.
public:
System::Configuration::ConfigurationSection ^ GetParentSection();
public System.Configuration.ConfigurationSection GetParentSection ();
member this.GetParentSection : unit -> System.Configuration.ConfigurationSection
Public Function GetParentSection () As ConfigurationSection
Returns
The configuration section that contains the ConfigurationSection that is associated with this SectionInformation object.
Exceptions
The method is invoked from a parent section.
Examples
The following example shows how to use the GetParentSection method.
static public void GetParentSection()
{
SectionInformation sInfo =
GetSectionInformation();
ConfigurationSection parentSection =
sInfo.GetParentSection();
Console.WriteLine("Parent section : {0}",
parentSection.SectionInformation.Name);
}
Public Shared Sub GetParentSection()
Dim sInfo As SectionInformation = _
GetSectionInformation()
Dim parentSection _
As ConfigurationSection = _
sInfo.GetParentSection()
Console.WriteLine("Parent section : {0}", _
parentSection.SectionInformation.Name)
End Sub
Remarks
If this ConfigurationSection object has no parent sections, the GetParentSection method returns the same value as the Name property.
Applies to
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про