ConfigurationElement.ElementInformation Eigenschaft
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Ruft ein ElementInformation-Objekt ab, das die nicht anpassbaren Informationen und Funktionen des ConfigurationElement-Objekts enthält.
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 mit den nicht anpassbaren Informationen und Funktionen des ConfigurationElement.
Im folgenden Beispiel wird die Verwendung der ElementInformation-Eigenschaft veranschaulicht.
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
Produkt | Versionen |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
Feedback zu .NET
.NET ist ein Open Source-Projekt. Wählen Sie einen Link aus, um Feedback zu geben: