This documentation is archived and is not being maintained.
ElementInformation Class
Visual Studio 2010
Contains meta-information about an individual element within the configuration. This class cannot be inherited.
Assembly: System.Configuration (in System.Configuration.dll)
The ElementInformation type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Errors | Gets the errors for the associated element and subelements |
![]() | IsCollection | Gets a value indicating whether the associated ConfigurationElement object is a ConfigurationElementCollection collection. |
![]() | IsLocked | Gets a value that indicates whether the associated ConfigurationElement object cannot be modified. |
![]() | IsPresent | Gets a value indicating whether the associated ConfigurationElement object is in the configuration file. |
![]() | LineNumber | Gets the line number in the configuration file where the associated ConfigurationElement object is defined. |
![]() | Properties | Gets a PropertyInformationCollection collection of the properties in the associated ConfigurationElement object. |
![]() | Source | Gets the source file where the associated ConfigurationElement object originated. |
![]() | Type | Gets the type of the associated ConfigurationElement object. |
![]() | Validator | Gets the object used to validate the associated ConfigurationElement object. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The following example shows how to get the ElementInformation associated with a ConfigurationElement object.
The following excerpt shows the configuration used by the previous code example.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="MyUrls" type="Samples.AspNet.UrlsSection,
ConfigurationElement, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null" allowDefinition="Everywhere"
allowExeDefinition="MachineToApplication"
restartOnExternalChanges="true" />
</configSections>
<MyUrls name="MyFavorites">
<simple name="Contoso" url="http://www.contoso.com" port="8080" />
<urls>
<clear />
<add name="Microsoft" url="http://www.microsoft.com" port="0" />
</urls>
</MyUrls>
</configuration>
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:
