ElementInformation.Type Property
.NET Framework (current version)
Gets the type of the associated ConfigurationElement object.
Assembly: System.Configuration (in System.Configuration.dll)
The following example shows how to use the Type property.
static public void GetElementType() { // 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; // Get the element type. Type elType = url.ElementInformation.Type; Console.WriteLine("Url element type: {0}", elType.ToString()); }
.NET Framework
Available since 2.0
Available since 2.0
Show: