Error.ErrorCode 属性

定义

获取或设置 对象的错误代码 ErrorObject

public:
 property int ErrorCode { int get(); void set(int value); };
public int ErrorCode { get; set; }
member this.ErrorCode : int with get, set
Public Property ErrorCode As Integer

属性值

示例

以下示例使用 Error 对象的 ErrorCode 属性在消息框中显示错误的错误代码号:

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

适用于