Share via


Errors.Item property

Gets a reference to the specified ErrorObject object from the collection.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
ReadOnly Default Property Item ( _
    index As Integer _
) As ErrorObject
    Get
'Usage
Dim instance As Errors
Dim index As Integer
Dim value As ErrorObject

value = instance(index)
ErrorObject this[
    int index
] { get; }

Parameters

  • index
    Type: System.Int32

    An expression that specifies the position of a member of the ErrorsCollection collection The argument must be a number from 0 to the value of the Count property minus 1.

Property value

Type: Microsoft.Office.Interop.InfoPath.ErrorObject

Remarks

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

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

Examples

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

Error nextError = thisXDocument.Errors[i];

See also

Reference

Errors interface

Errors members

Microsoft.Office.Interop.InfoPath namespace