ConfigurationElement.ElementInformation Property

 

Gets an ElementInformation object that contains the non-customizable information and functionality of the ConfigurationElement object.

Namespace:   System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

public ElementInformation ElementInformation { get; }

Property Value

Type: System.Configuration.ElementInformation

An ElementInformation that contains the non-customizable information and functionality of the ConfigurationElement.

The following example shows how to use the ElementInformation property.

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;

}

.NET Framework
Available since 2.0
Return to top
Show: