SectionInformation.Name 属性

定义

获取关联配置节的名称。

public:
 property System::String ^ Name { System::String ^ get(); };
public string Name { get; }
member this.Name : string
Public ReadOnly Property Name As String

属性值

配置节的完整名称。

示例

以下示例演示如何获取 Name 对象的值 ConfigurationSection

static public void GetSectionNameProperty()
{
    SectionInformation sInfo =
        GetSectionInformation();

    string sectionNameProperty = sInfo.Name;
    Console.WriteLine("Section name: {0}", 
        sectionNameProperty);
}
Public Shared Sub GetSectionNameProperty() 

    Dim sInfo As SectionInformation = _
    GetSectionInformation()
    
    Dim sectionNameProperty _
    As String = sInfo.Name
    Console.WriteLine("Section name: {0}", _
    sectionNameProperty)

End Sub

注解

Name是不带路径的节的名称。

适用于