SecurityElement Construtores
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Inicializa uma nova instância da SecurityElement classe.
Sobrecargas
| Name | Description |
|---|---|
| SecurityElement(String) |
Inicializa uma nova instância da SecurityElement classe com a etiqueta especificada. |
| SecurityElement(String, String) |
Inicializa uma nova instância da SecurityElement classe com a etiqueta e o texto especificados. |
SecurityElement(String)
Inicializa uma nova instância da SecurityElement classe com a etiqueta especificada.
public:
SecurityElement(System::String ^ tag);
public SecurityElement(string tag);
new System.Security.SecurityElement : string -> System.Security.SecurityElement
Public Sub New (tag As String)
Parâmetros
- tag
- String
O nome da etiqueta de um elemento XML.
Exceções
O tag parâmetro é null.
O tag parâmetro é inválido em XML.
Exemplos
O código seguinte mostra a utilização do SecurityElement construtor para criar um novo SecurityElement objeto. Este exemplo de código faz parte de um exemplo maior fornecido para a SecurityElement classe.
SecurityElement windowsRoleElement =
new SecurityElement("WindowsMembership.WindowsRole");
Dim windowsRoleElement As New SecurityElement("WindowsMembership.WindowsRole")
Observações
O tag parâmetro deve consistir num nome de etiqueta XML válido. Use Escape para remover caracteres inválidos da cadeia.
Aplica-se a
SecurityElement(String, String)
Inicializa uma nova instância da SecurityElement classe com a etiqueta e o texto especificados.
public:
SecurityElement(System::String ^ tag, System::String ^ text);
public SecurityElement(string tag, string text);
new System.Security.SecurityElement : string * string -> System.Security.SecurityElement
Public Sub New (tag As String, text As String)
Parâmetros
- tag
- String
O nome da etiqueta do elemento XML.
- text
- String
O conteúdo do texto dentro do elemento.
Exceções
O tag parâmetro é null.
O tag parâmetro ou text parâmetro é inválido em XML.
Observações
Se o text parâmetro for, null este construtor produz um elemento idêntico ao construtor sem parâmetros.