ViewInfoCollection.Item Property (Int32)
Gets the specified ViewInfo object from the ViewInfoCollection collection by index value.
Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)
Syntax
'Declaration
'Usage
Parameters
- index
The zero-based index of the ViewInfo object to get.
Property Value
A ViewInfo object from the ViewInfoCollection collection that corresponds to the specified index value.
Exceptions
Exception type | Condition |
---|---|
The specified index is out of range. |
Remarks
The value passed for the index parameter must be a number from 0 to the value of the collection's Count property minus 1.
This member can be accessed without restrictions.
This type or member can be accessed from code running in forms opened in Microsoft Office InfoPath 2007 or in a Web browser.
Example
The following example sets a variable to the ViewInfo object that represents the first view in the collection.
ViewInfo firstView = this.ViewInfos[0];
Dim firstView As ViewInfo = Me.ViewInfos(0)
See Also
Reference
ViewInfoCollection Class
ViewInfoCollection Members
Microsoft.Office.InfoPath Namespace