Export (0) Print
Expand All

XmlFormCollection.Item property

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)

public abstract XmlForm this[
	int index
] { get; }

Parameters

index
Type: System.Int32

The zero-based index of the form to return.

Property value

Type: Microsoft.Office.InfoPath.XmlForm
The XmlForm object for the specified index value.

ExceptionCondition
IndexOutOfRangeException

The index provided is out of range.

If the value that is 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 InfoPath Filler.

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

XmlForm firstForm = this.Application.XmlForms[0];
Show:
© 2015 Microsoft