SecurityElement::Attributes Property
.NET Framework (current version)
Gets or sets the attributes of an XML element as name/value pairs.
Assembly: mscorlib (in mscorlib.dll)
| Exception | Condition |
|---|---|
| InvalidCastException | The name or value of the Hashtable object is invalid. |
| ArgumentException | The name is not a valid XML attribute name. |
Each attribute is stored in the Hashtable as a name/value pair.
Names and values in attributes should contain only valid XML attribute characters. Use Escape to remove invalid characters from the string.
There is no support for quoted strings, so strings for name/value pairs should not contain quotes or other characters requiring quoting.
The following code shows the use of the Attributes property to get an attribute of an XML element. This code example is part of a larger example provided for the SecurityElement class.
.NET Framework
Available since 1.1
Available since 1.1
Show: