This documentation is archived and is not being maintained.

XmlArrayItemAttribute.NestingLevel Property

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

[Visual Basic]
Public Property NestingLevel As Integer
[C#]
public int NestingLevel {get; set;}
[C++]
public: __property int get_NestingLevel();
public: __property void set_NestingLevel(int);
[JScript]
public function get NestingLevel() : int;
public function set NestingLevel(int);

Property Value

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 only used 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 will be applied to the first array index. Only the subsequent XmlArrayItemAttribute objects need NestingLevel values specified (as 1, 2, 3, and so forth).

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

XmlArrayItemAttribute Class | XmlArrayItemAttribute Members | System.Xml.Serialization Namespace

Show: