Error.ErrorType Property

Definition

Gets the type of an ErrorObject object.

public:
 property System::String ^ ErrorType { System::String ^ get(); };
public string ErrorType { get; }
member this.ErrorType : string
Public ReadOnly Property ErrorType As String

Property Value

Examples

In the following example, the ErrorType property of the ErrorObject object is used to display the type of an error in a message box:

Error objError = XDocument.Errors[0];
thisXDocument.UI.Alert("Error type: " + objError.<span class="label">ErrorType</span>);

Remarks

There are three types of data validation errors that can occur in an InfoPath form:

Note: The ErrorType property can be used to determine the type of data validation error that has occurred.

Important: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Applies to