SecurityElement.SearchForChildByTag(String) Método

Definição

Encontra uma criança pelo nome da etiqueta.

public:
 System::Security::SecurityElement ^ SearchForChildByTag(System::String ^ tag);
public System.Security.SecurityElement SearchForChildByTag(string tag);
member this.SearchForChildByTag : string -> System.Security.SecurityElement
Public Function SearchForChildByTag (tag As String) As SecurityElement

Parâmetros

tag
String

A etiqueta para pesquisar elementos filhos.

Devoluções

O primeiro elemento XML filho com o valor de etiqueta especificado, ou null se não existir nenhum elemento filho com tag .

Exceções

O tag parâmetro é null.

Exemplos

O código seguinte mostra o uso do SearchForChildByTag método para encontrar um filho pelo nome da sua etiqueta. Este exemplo de código faz parte de um exemplo maior fornecido para a SecurityElement classe.

if (localXmlElement.SearchForChildByTag("destroytime") != null)
If Not (localXmlElement.SearchForChildByTag("destroytime") Is Nothing) Then

Observações

Com XML da seguinte forma, SearchForChildByTag("second") retornaria o elemento <second>filho .

<thetag A="123" B="456" C="789"> <first>text1</first>
       <second>text2</second></thetag>

Aplica-se a