ConfigurationElement Constructor ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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
Show: