ConfigurationElement 构造函数 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 ConfigurationElement 类的新实例。
protected:
 ConfigurationElement();protected ConfigurationElement ();Protected Sub New ()示例
以下示例演示如何使用自定义构造函数。
// Constructor allowing name, url, and port to be specified.
public UrlConfigElement(String newName,
    String newUrl, int newPort)
{
    Name = newName;
    Url = newUrl;
    Port = newPort;
}
' Constructor allowing name, url, and port to be specified.
Public Sub New(ByVal newName As String, _
    ByVal newUrl As String, _
    ByVal newPort As Integer)
    Name = newName
    Url = newUrl
    Port = newPort
End Sub
注解
例如,每次应用程序需要向相关ConfigurationElementCollection集合添加新元素时,都会创建 类的新实例ConfigurationElement。