Errors.Count Property
Gets a count of the number of ErrorObject objects contained in the collection.
Namespace: Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Syntax
'Declaration
ReadOnly Property Count As Integer
Get
'Usage
Dim instance As Errors
Dim value As Integer
value = instance.Count
int Count { get; }
Property Value
Type: System.Int32
Remarks
Important
This member can be accessed without restrictions.
Examples
In the following example, the Count property is used to iterate through the collection of Error objects and display a message box indicating the short error message of each error:
for (int i=0; i < thisXDocument.Errors.Count; i++)
{
thisXDocument.UI.Alert("Error message: " + thisXDocument.Errors[i].ShortErrorMessage);
}