SectionInformation.Type 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定區段類別名稱。
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 的 section 類別名稱。