Class HResultExtensions
Extensions to handle the HResult
Inheritance
System.Object
HResultExtensions
Namespace: Dapplo.Windows.Common.Extensions
Assembly: Dapplo.Windows.Common.dll
Syntax
public static class HResultExtensions : object
Methods
| Improve this Doc View SourceFailed(HResult)
Test if the HResult respresents a fail
Declaration
public static bool Failed(this HResult hResult)
Parameters
Type | Name | Description |
---|---|---|
HResult | hResult | HResult |
Returns
Type | Description |
---|---|
System.Boolean | bool |
Succeeded(HResult)
Test if the HResult respresents a success
Declaration
public static bool Succeeded(this HResult hResult)
Parameters
Type | Name | Description |
---|---|---|
HResult | hResult | HResult |
Returns
Type | Description |
---|---|
System.Boolean | bool |
ThrowOnFailure(HResult)
Throw an exception on Failure
Declaration
public static void ThrowOnFailure(this HResult hResult)
Parameters
Type | Name | Description |
---|---|---|
HResult | hResult | HResult |