We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc1c576 commit a6892d0Copy full SHA for a6892d0
Utility/HResult.cs
@@ -13,6 +13,7 @@ public readonly struct HResult
13
internal HResult(int value) => Value = value;
14
public static implicit operator int(HResult value) => value.Value;
15
public static implicit operator uint(HResult value) => (uint)value.Value;
16
+ public static implicit operator bool(HResult value) => value.Value == 0;
17
public static implicit operator HResult(int value) => new(value);
18
public static implicit operator HResult(uint value) => new((int)value);
19
public static implicit operator HResult(bool value) => new(value ? 0 : 1);
0 commit comments