Add Method

XmlAnyElementAttributes.Add Method

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

Represents a collection of XmlAnyElementAttribute objects.

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

public int Add(
	XmlAnyElementAttribute attribute
)

Parameters

attribute
Type: System.Xml.Serialization.XmlAnyElementAttribute
The XmlAnyElementAttribute to add to the collection.

Return Value

Type: System.Int32
The index of the added item.

Use the XmlAnyElementAttributes to override the behavior of a set of XmlAnyElementAttribute objects. Multiple instances of the XmlAnyElementAttribute class can be applied to a class member, as long as each instance has a distinct Name property value; this instructs the XmlSerializer to collect unknown elements under the named element into the appropriate array. It is for this reason that multiple instances of the XmlAnyElementAttribute class can be added to the XmlAnyElementAttributes.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft