Errors.Count 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 count of the number of ErrorObject objects contained in the collection.
public:
property int Count { int get(); };
public int Count { get; }
member this.Count : int
Public ReadOnly Property Count As Integer
Property Value
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.<span class="label">Count</span>; i++)
{
thisXDocument.UI.Alert("Error message: " + thisXDocument.Errors[i].ShortErrorMessage);
}