Upravit

Sdílet prostřednictvím


Errors.Count Property

Definition

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 &lt; thisXDocument.Errors.<span class="label">Count</span>; i++)
{
 thisXDocument.UI.Alert("Error message: " + thisXDocument.Errors[i].ShortErrorMessage);
}

Applies to