XmlAnyElementAttributes.Add Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Represents a collection of XmlAnyElementAttribute objects.

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

Syntax

'Declaration
Public Function Add ( _
    attribute As XmlAnyElementAttribute _
) As Integer
public int Add(
    XmlAnyElementAttribute attribute
)

Parameters

Return Value

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

Remarks

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.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.