通过


SectionInformation.Type 属性

定义

获取或设置节类名。

public:
 property System::String ^ Type { System::String ^ get(); void set(System::String ^ value); };
public string Type { get; set; }
member this.Type : string with get, set
Public Property Type As String

属性值

与此 ConfigurationSection 部分关联的类的名称。

例外

所选值为 null 空字符串(“)。

所选值与已定义的值冲突。

示例

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

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

    string sectionType = sInfo.Type;
    Console.WriteLine("Section type: {0}", sectionType);
}
Public Shared Sub GetSectionType() 
    Dim sInfo As SectionInformation = _
    GetSectionInformation()
    
    Dim sectionType As String = sInfo.Type
    Console.WriteLine("Section type: {0}", _
    sectionType)

End Sub

注解

Type 属性返回处理该类的此实例的 ConfigurationSection 节类的名称。

适用于