Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

XDocument Constructor (XDocument)

 

Initializes a new instance of the XDocument class from an existing XDocument object.

Namespace:   System.Xml.Linq
Assembly:  System.Xml.Linq (in System.Xml.Linq.dll)

public XDocument(
	XDocument other
)

Parameters

other
Type: System.Xml.Linq.XDocument

The XDocument object that will be copied.

You use this constructor to make a deep copy of an XDocument.

This constructor traverses all nodes and attributes in the document specified in the other parameter, and creates copies of all nodes as it assembles the newly initialized XDocument.

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: