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
Public MustOverride ReadOnly Default Property Item ( _
index As Integer _
) As ViewInfo
Get
'Usage
Dim instance As ViewInfoCollection
Dim index As Integer
Dim value As ViewInfo
value = instance(index)
public abstract ViewInfo this[
int index
] { get; }
Parameters
index
Type: System.Int32The zero-based index of the ViewInfo object to get.
Property value
Type: Microsoft.Office.InfoPath.ViewInfo
A ViewInfo object from the ViewInfoCollection collection that corresponds to the specified index value.
Exceptions
Exception | Condition |
---|---|
IndexOutOfRangeException | 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 InfoPath Filler or in a Web browser.
Examples
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)