FormErrorCollection.Delete Method (FormError)
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)
The error is not of type FormErrorType.UserDefined.
The error is not in the collection.
The parameter passed to this method is null.
The parameter passed to this method isnot valid. For example, it is of the wrong type or format.
Only errors of type ErrorType.UserDefined can be deleted from the collection. If the specified error is not user-defined, or is not in the collection, an exception is thrown.
This member can be accessed without restrictions.
This type or member can be accessed from code running in forms opened in Microsoft Office InfoPath 2007 or in a Web browser.
In the following example, the GetErrors(FormErrorType) method of the FormErrorCollection class is used to get an array of all user-defined errors in the form's error collection. Then, the Delete(formError) method is used to delete the first FormError object in the array from the form's error collection.