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.
XAttribute Constructor (XAttribute^)
.NET Framework (current version)
Initializes a new instance of the XAttribute class from another XAttribute object.
Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
Parameters
- other
-
Type:
System.Xml.Linq::XAttribute^
An XAttribute object to copy from.
| Exception | Condition |
|---|---|
| ArgumentNullException | The other parameter is null. |
This constructor is primarily used internally when making a deep copy of an XML tree.
This example demonstrates that creating a deep copy of an XML tree creates a copy, not a clone, of an attribute in the tree.
This example produces the following output:
Creating a deep copy created a new attribute from the original.
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
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
Show: