SecurityElement Konstruktory
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Inicializuje novou instanci SecurityElement třídy.
Přetížení
SecurityElement(String) |
Inicializuje novou instanci SecurityElement třídy se zadanou značkou. |
SecurityElement(String, String) |
Inicializuje novou instanci SecurityElement třídy se zadanou značkou a textem. |
SecurityElement(String)
Inicializuje novou instanci SecurityElement třídy se zadanou značkou.
public:
SecurityElement(System::String ^ tag);
public SecurityElement (string tag);
new System.Security.SecurityElement : string -> System.Security.SecurityElement
Public Sub New (tag As String)
Parametry
- tag
- String
Název značky elementu XML.
Výjimky
tag
Parametr je null
.
tag
Parametr není v kódu XML platný.
Příklady
Následující kód ukazuje použití SecurityElement konstruktoru pro vytvoření nového SecurityElement objektu. Tento příklad kódu je součástí většího příkladu, který je k dispozici pro SecurityElement třídu.
SecurityElement^ windowsRoleElement = gcnew SecurityElement( L"WindowsMembership.WindowsRole" );
SecurityElement windowsRoleElement =
new SecurityElement("WindowsMembership.WindowsRole");
Dim windowsRoleElement As New SecurityElement("WindowsMembership.WindowsRole")
Poznámky
tag
Parametr musí obsahovat platný název značky XML. Slouží Escape k odebrání neplatných znaků z řetězce.
Platí pro
SecurityElement(String, String)
Inicializuje novou instanci SecurityElement třídy se zadanou značkou a textem.
public:
SecurityElement(System::String ^ tag, System::String ^ text);
public SecurityElement (string tag, 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)
Parametry
- tag
- String
Název značky elementu XML.
- text
- String
Textový obsah v rámci elementu.
Výjimky
tag
Parametr je null
.
tag
Parametr nebo text
parametr jsou v kódu XML neplatné.
Poznámky
Pokud text
je parametr null
tohoto konstruktoru, vytvoří prvek totožný s konstruktor bez parametrů.