ConfigurationElement Construtor

Definição

Inicializa uma nova instância da classe ConfigurationElement.

protected:
 ConfigurationElement();
protected ConfigurationElement ();
Protected Sub New ()

Exemplos

O exemplo a seguir mostra como usar um construtor personalizado.

// 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

Comentários

Você cria uma nova instância da ConfigurationElement classe, por exemplo, sempre que o aplicativo precisa adicionar um novo elemento à coleção relacionada ConfigurationElementCollection .

Aplica-se a