ConfigurationElement Constructor

ConfigurationElement Constructor ()


Initializes a new instance of the ConfigurationElement class.

Namespace:   System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

protected ConfigurationElement()

You create a new instance of the ConfigurationElement class, for example, every time your application needs to add a new element to the related ConfigurationElementCollection collection.

The following example shows how to use a customized constructor.

// Constructor allowing name, url, and port to be specified.
public UrlConfigElement(String newName,
    String newUrl, int newPort)
    Name = newName;
    Url = newUrl;
    Port = newPort;

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft