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 區段類別名稱。

適用於