Uredi

Deli z drugimi prek


ConfigurationElement.ElementInformation Property

Definition

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

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

Property Value

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

Examples

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;
}
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

Applies to

See also