DataObjects.Item[Object] Property

Definition

Gets a reference to the specified DataSourceObject object from the DataObjectsCollection collection.

public:
 property Microsoft::Office::Interop::InfoPath::DataSourceObject ^ default[System::Object ^] { Microsoft::Office::Interop::InfoPath::DataSourceObject ^ get(System::Object ^ varIndex); };
public Microsoft.Office.Interop.InfoPath.DataSourceObject this[object varIndex] { get; }
member this.Item(obj) : Microsoft.Office.Interop.InfoPath.DataSourceObject
Default Public ReadOnly Property Item(varIndex As Object) As DataSourceObject

Parameters

varIndex
Object

An expression that specifies the position of a member of the DataObjects collection. If a numeric expression, the argument must be a number from 0 to the value of the Count property minus 1. If a string expression, the argument must be the name of a member of the collection.

Property Value

Examples

Because the Item property is the default property of the DataObjectsCollection collection, it can be used as follows:

DataObject myDataObject = thisXDocument.DataObjects[i];

Remarks

If the value provided for the varIndex argument does not match any existing member of the collection, an error occurs.

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

Applies to