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>);

注解

重要提示:此成员只能由与当前打开的窗体在同一域中运行的表单访问,或者由已授予跨域权限的表单访问。

适用于