ErrorHandler.Failed Method
Checks if an HRESULT is an error return code.
Namespace: Microsoft.VisualStudio
Assembly: Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Syntax
声明
Public Shared Function Failed ( _
hr As Integer _
) As Boolean
用法
Dim hr As Integer
Dim returnValue As Boolean
returnValue = ErrorHandler.Failed(hr)
public static bool Failed(
int hr
)
public:
static bool Failed(
int hr
)
public static function Failed(
hr : int
) : boolean
Parameters
hr
Type: System.Int32The HRESULT to test.
Return Value
Type: System.Boolean
true if hr represents an error, otherwise false.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Concepts
HRESULT Information in Managed Code