Udostępnij za pośrednictwem


XmlArrayItemAttribute.NestingLevel Property

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

Gets or sets the level in a hierarchy of XML elements that the XmlArrayItemAttribute affects.

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

Syntax

'Declaration
Public Property NestingLevel As Integer
public int NestingLevel { get; set; }

Property Value

Type: System.Int32
The zero-based index of a set of indexes in an array of arrays.

Remarks

An XML document can contain hierarchies of XML elements. To represent such a hierarchy, an array of arrays is used. In such an array, each index represents a level in the hierarchy. Therefore, the NestingLevel property is used only when applying an XmlArrayItemAttribute to a field that returns an array of arrays.

When applying the attribute, specify which hierarchy level the attribute affects by setting the NestingLevel. The first index always has the value of 0; therefore, it is optional to set its NestingLevel. An XmlArrayItemAttribute without a NestingLevel value is applied to the first array index. Only the subsequent XmlArrayItemAttribute objects require NestingLevel values specified (as 1, 2, 3, and so forth).

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.