O'Reilly logo

Pro LINQ: Language Integrated Query in C# 2008 by Joseph C. Rattz Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Attributes

The Attributes operator can be called on a sequence of elements and returns a sequence containing the attributes of each source element.

Prototypes

The Attributes operator has two prototypes.

Example. The First Attributes Prototype
public static IEnumerable<XAttribute> Attributes (
  this IEnumerable<XElement> source
)

This version of the operator can be called on a sequence of elements and returns a sequence of attributes containing all the attributes for each source element.

Example. The Second Attributes Prototype
public static IEnumerable<XAttribute> Attributes (
  this IEnumerable<XElement> source,
  XName name
)

This version of the operator is like the first, except only those attributes matching the specified name will be returned ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required