SecurityElement.AddChild(SecurityElement) Método

Definição

Adiciona um elemento filho ao elemento XML.Adds a child element to the XML element.

public:
 void AddChild(System::Security::SecurityElement ^ child);
public void AddChild (System.Security.SecurityElement child);
member this.AddChild : System.Security.SecurityElement -> unit
Public Sub AddChild (child As SecurityElement)

Parâmetros

child
SecurityElement

O elemento filho a adicionar.The child element to add.

Exceções

O parâmetro child é null.The child parameter is null.

Exemplos

O código a seguir mostra o uso do AddChild método para adicionar um elemento filho ao elemento XML.The following code shows the use of the AddChild method to add a child element to the XML element. Este exemplo de código faz parte de um exemplo maior fornecido para a SecurityElement classe.This code example is part of a larger example provided for the SecurityElement class.

xmlRootElement->AddChild( windowsRoleElement );
xmlRootElement.AddChild(windowsRoleElement);
xmlRootElement.AddChild(windowsRoleElement)

Comentários

O elemento filho é adicionado seguindo quaisquer elementos filho existentes anteriormente.The child element is added following any previously existing child elements.

Aplica-se a