SecurityElement SecurityElement SecurityElement SecurityElement Constructors

Definition

Overloads

SecurityElement(String) SecurityElement(String) SecurityElement(String) SecurityElement(String)

Initializes a new instance of the SecurityElement class with the specified tag.

SecurityElement(String, String) SecurityElement(String, String) SecurityElement(String, String) SecurityElement(String, String)

Initializes a new instance of the SecurityElement class with the specified tag and text.

SecurityElement(String) SecurityElement(String) SecurityElement(String) SecurityElement(String)

Initializes a new instance of the SecurityElement class with the specified tag.

public:
 SecurityElement(System::String ^ tag);
public SecurityElement (string tag);
new System.Security.SecurityElement : string -> System.Security.SecurityElement
Public Sub New (tag As String)

Parameters

tag
String String String String

The tag name of an XML element.

Exceptions

Examples

The following code shows the use of the SecurityElement constructor to create a new SecurityElement object. This code example is part of a larger example provided for the SecurityElement class.

SecurityElement^ windowsRoleElement = gcnew SecurityElement( L"WindowsMembership.WindowsRole" );
SecurityElement windowsRoleElement = 
    new SecurityElement("WindowsMembership.WindowsRole");
Dim windowsRoleElement As New SecurityElement("WindowsMembership.WindowsRole")

Remarks

The tag parameter must consist of a valid XML tag name. Use Escape to remove invalid characters from the string.

SecurityElement(String, String) SecurityElement(String, String) SecurityElement(String, String) SecurityElement(String, String)

Initializes a new instance of the SecurityElement class with the specified tag and text.

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)

Parameters

tag
String String String String

The tag name of the XML element.

text
String String String String

The text content within the element.

Exceptions

The tag parameter or text parameter is invalid in XML.

Remarks

If the text parameter is null this constructor produces an element identical to the parameterless constructor.

Applies to