ConfigurationElement.ElementInformation Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Colaborar con nosotros en GitHub
El origen de este contenido se puede encontrar en GitHub, donde también puede crear y revisar problemas y solicitudes de incorporación de cambios. Para más información, consulte nuestra guía para colaboradores.