Skip to content

Commit

Permalink
Usage in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasArdal committed Nov 14, 2023
1 parent e0113f4 commit 7d3d471
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Elmah.Io.HResults

A little helper resolving extended information from HResults
A little helper resolving extended information from HResults.

## Usage

```csharp
try
{
// ...
}
catch (Exception ex)
{
HResult hresult = HResult.Parse(ex.HResult);
Console.WriteLine(hresult.Hex);
Console.WriteLine(hresult.IsFailure);
Console.WriteLine(hresult.Facility);
Console.WriteLine(hresult.ErrorCode);
}
```

0 comments on commit 7d3d471

Please sign in to comment.