Attribute (XElement Dynamic Property)

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Gets an indexer used to retrieve the attribute instance that corresponds to the specified expanded name.

Syntax

elem.Attribute[{namespaceName}attribName]

Property Value/Return Value

An indexer of the type XAttribute Item(String expandedName). This indexer takes the expanded name of the specified attribute and returns the corresponding XAttribute, or null if there is no attribute with the specified name.

Remarks

This property is equivalent to the Attribute method of the System.Xml.Linq.XElement class.

See Also

System.Xml.Linq.XElement.Attribute XElement Class Dynamic Properties Value