Share via


Error.ErrorCode property

Gets or sets the error code of an ErrorObject object.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
Property ErrorCode As Integer
    Get
    Set
'Usage
Dim instance As Error
Dim value As Integer

value = instance.ErrorCode

instance.ErrorCode = value
int ErrorCode { get; set; }

Property value

Type: System.Int32

Examples

In the following example, the ErrorCode property of the Error object is used to display the error code number of an error in a message box:

ErrorObject er = thisXDocument.Errors[0];
IXMLDOMNode myNode = er.Node;
thisXDocument.UI.Alert("this is the error code: " + er.ErrorCode);

See also

Reference

Error interface

Error members

Microsoft.Office.Interop.InfoPath namespace