SecurityElement::Tag Property

 

Gets or sets the tag name of an XML element.

Namespace:   System.Security
Assembly:  mscorlib (in mscorlib.dll)

public:
property String^ Tag {
	String^ get();
	void set(String^ value);
}

Property Value

Type: System::String^

The tag name of an XML element.

Exception Condition
ArgumentNullException

The tag is null.

ArgumentException

The tag is not valid in XML.

In XML, the tag appears in the script as appears below:

<tag attributes>text</tag>

If this element has child elements, the children will replace text.

Assign only valid XML tag strings to this property. Use Escape to remove invalid characters from the string.

The following code shows the use of the Tag property to get the tag name of an XML element. This code example is part of a larger example provided for the SecurityElement class.

String^ xmlTreeName = xmlElement->Tag->ToString();

.NET Framework
Available since 1.1
Return to top
Show: