XmlFormCollection.Item Property (Microsoft.Office.InfoPath)

Gets a reference to the specified XmlForm object from the collection by index value.

Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)

Syntax

'Declaration
Public MustOverride ReadOnly Default Property Item ( _
    index As Integer _
) As XmlForm
'Usage
Dim instance As XmlFormCollection
Dim index As Integer
Dim value As XmlForm

value = instance(index)
public abstract XmlForm this [
    int index
] { get; }

Parameters

  • index
    The zero-based index of the form to return.

Property Value

The XmlForm object for the specified index value.

Exceptions

Exception type Condition

IndexOutOfRangeException

The index provided is out of range.

Remarks

If the value provided for the index parameter does not match any existing member of the collection, an exception is raised.

After you have set a reference to the XmlForm object that the Item property returns, you can access any of its properties or methods.

This member can be accessed without restrictions.

This type or member can be accessed only from code running in forms opened in Microsoft Office InfoPath 2007.

Example

Because the Item property is the default property of the XmlFormCollection class, it can be used as shown in the following example.

XmlForm firstForm = this.Application.XmlForms[0];
Dim firstForm As XmlForm  = Me.Application.XmlForms(0)

See Also

Reference

XmlFormCollection Class
XmlFormCollection Members
Microsoft.Office.InfoPath Namespace