XDocuments2.Item[Object] Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a reference to the specified XDocument object from the collection.
public:
property Microsoft::Office::Interop::InfoPath::XDocument ^ default[System::Object ^] { Microsoft::Office::Interop::InfoPath::XDocument ^ get(System::Object ^ varIndex); };
public Microsoft.Office.Interop.InfoPath.XDocument this[object varIndex] { get; }
member this.Item(obj) : Microsoft.Office.Interop.InfoPath.XDocument
Default Public ReadOnly Property Item(varIndex As Object) As XDocument
Parameters
- varIndex
- Object
An expression that specifies the position of a member of the XDocumentsCollection. If a numeric expression, the argument must be a number from 0 to the value of the Count minus 1. If a string expression, the argument must be the Uniform Resource Locator (URL) path of a member of the collection.
Property Value
Implements
Examples
Because the Item property is the default property of the XDocumentsCollection collection, it can be used as follows:
XDocument firstDocument;
firstDocument = thisApplication.XDocuments[0];
You can use the name of the XDocument as the argument to the Item method, as shown in the following example:
XDocument myFormDocument;
myFormDocument = thisApplication.XDocuments[@"C:\MyForm.xml"];
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 XDocument object that the Item property returns, you can access any of its properties or methods.