SectionInformation.Type Egenskap

Definition

Hämtar eller anger avsnittets klassnamn.

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

Egenskapsvärde

Namnet på den klass som är associerad med det här ConfigurationSection avsnittet.

Undantag

Det valda värdet är null eller en tom sträng ("").

Det valda värdet står i konflikt med ett värde som redan har definierats.

Exempel

I följande exempel visas hur du hämtar värdet för Type ett ConfigurationSection objekt.

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

Kommentarer

Egenskapen Type returnerar namnet på den avsnittsklass som hanterar den här instansen ConfigurationSection av klassen.

Gäller för