XStreamingElement Constructor (XName, Object)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Initializes a new instance of the XStreamingElement class with the specified name and content.
Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
Parameters
- name
- Type: System.Xml.Linq.XName
An XName that contains the element name.
- content
- Type: System.Object
The contents of the element.
This constructor creates a streaming element with the specified content and attributes.
There is an implicit conversion from string to XName. Typical use of this constructor is to specify a string as the parameter instead of creating a new XName.
Queries are not iterated until the XStreamingElement is serialized. This is in contrast to using queries for content for an XElement, where queries are iterated at the time of construction of the new XElement.
For details about the valid content that can be passed to this constructor, see Valid Content of XElement and XDocument Objects.