System.Security.SecurityElement.Attribute Method

Finds an attribute by name in an XML element.

Syntax

public string Attribute (string name)

Parameters

name
The name of the attribute for which to search.

Returns

The value associated with the named attribute, or null if no attribute with name exists.

Remarks

With XML as follows, Attribute("B") would return "456".

Example

<thetag A="123" B="456" C="789">text</thetag>

Requirements

Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0