/// <summary> /// Create a new instance of <see cref="HResult"/> /// </summary> /// <param name="errorCode"></param> public HResult(uint result) { if (!Enum.IsDefined(typeof(HResultType), result)) { throw new InvalidOperationException($"{result} is not an underlying value of {typeof(HResultType)}"); } Result = (HResultType)result; }
/// <summary> /// Create a new instance of <see cref="HResult"/> /// </summary> /// <param name="errorCode"></param> public HResult(HResultType result) { Result = result; }