Item Property
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

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)

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.

Exception typeCondition

IndexOutOfRangeException

The index provided is out of range.

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.

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];
Show:
© 2016 Microsoft