Export (0) Print
Expand All

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft