Bagikan melalui


ConfigurationElement.ElementInformation Properti

Definisi

ElementInformation Mendapatkan objek yang berisi informasi dan fungsionalitas ConfigurationElement objek yang tidak dapat disesuaikan.

public:
 property System::Configuration::ElementInformation ^ ElementInformation { System::Configuration::ElementInformation ^ get(); };
public System.Configuration.ElementInformation ElementInformation { get; }
member this.ElementInformation : System.Configuration.ElementInformation
Public ReadOnly Property ElementInformation As ElementInformation

Nilai Properti

Yang ElementInformation berisi informasi dan fungsionalitas yang tidak dapat disesuaikan dari ConfigurationElement.

Contoh

Contoh berikut menunjukkan cara menggunakan ElementInformation properti .

static public ElementInformation
    GetElementInformation()
{

    // Get the current configuration file.
    System.Configuration.Configuration config =
            ConfigurationManager.OpenExeConfiguration(
            ConfigurationUserLevel.None);

    // Get the section.
    UrlsSection section =
        (UrlsSection)config.GetSection("MyUrls");

    // Get the element.
    UrlConfigElement url = section.Simple;

    ElementInformation eInfo =
        url.ElementInformation;

    return eInfo;
}
Public Shared Function GetElementInformation() _
As ElementInformation

    ' Get the current configuration file.
    Dim config _
    As System.Configuration.Configuration = _
    ConfigurationManager.OpenExeConfiguration( _
    ConfigurationUserLevel.None)

    ' Get the section.
    Dim section As UrlsSection = CType( _
    config.GetSection("MyUrls"), UrlsSection)

    ' Get the element.
    Dim url As UrlConfigElement = _
    section.Simple

    Dim eInfo As ElementInformation = _
    url.ElementInformation

    Return eInfo

End Function 'GetElementInformation

Berlaku untuk

Lihat juga