ConfigurationElement.ElementInformation Свойство

Определение

Возвращает объект ElementInformation, содержащий неизменяемую информацию и функциональность объекта ConfigurationElement.

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

Значение свойства

ElementInformation

Элемент конфигурации ElementInformation, содержащий неизменяемую информацию и функциональность объекта ConfigurationElement.

Примеры

В следующем примере показано, как использовать свойство ElementInformation.

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

Применяется к

См. также раздел