SetValue Method
Collapse the table of content
Expand the table of content

XAttribute.SetValue Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Sets the value of this attribute.

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

'Declaration
Public Sub SetValue ( _
	value As Object _
)

Parameters

value
Type: System.Object
The value to assign to this attribute.

ExceptionCondition
ArgumentNullException

The value parameter is Nothing.

ArgumentException

The value is an XObject.

The value is converted to its string representation and assigned to the Value property.

It is invalid to pass an instance of a class that derives from XObject, such as XElement or XAttribute.

This method will raise the Changed and the Changing events.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft