SectionInformation.Type Właściwość

Definicja

Pobiera lub ustawia nazwę klasy sekcji.

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

Wartość właściwości

Nazwa klasy skojarzonej z tą ConfigurationSection sekcją.

Wyjątki

Wybrana wartość to null lub pusty ciąg ("").

Wybrana wartość powoduje konflikt z już zdefiniowaną wartością.

Przykłady

W poniższym przykładzie pokazano, jak uzyskać Type wartość ConfigurationSection obiektu.

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

Uwagi

Właściwość Type zwraca nazwę klasy sekcji, która obsługuje to wystąpienie ConfigurationSection klasy.

Dotyczy