XMLNodes.Count Property

Gets the number of items in the XMLNodes collection.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

Syntax

'Declaration
ReadOnly Property Count As Integer
int Count { get; }

Property Value

Type: System.Int32
The number of items in the XMLNodes collection.

Examples

The following code example uses the Count property to display the number of items in an XMLNodes collection. This example assumes that the current document contains an XMLNodes control named SampleInsertNodes.

Private Sub DisplayItemCount()
    MsgBox("SampleInsertNodes contains " & _
        Me.SampleInsertNodes.Count.ToString() + " items.")
End Sub
private void DisplayItemCount()
{
    MessageBox.Show("SampleInsertNodes contains " +
        this.SampleInsertNodes.Count.ToString() + " items.");
}

.NET Framework Security

See Also

Reference

XMLNodes Interface

Microsoft.Office.Tools.Word Namespace