-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
dotnet/runtime#46829 (comment)
Description
(new System.ComponentModel.Win32Exception(0x50)).HResult.ToString("X") output 0x80004005. From the documentation of Exception.HResult: we get "The HRESULT value" and "Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception."
Spent some time debugging this before managing to reduce it to Win32Exception. The expected value this would have had from the documentation is 80070050 but it got 80004005. Either the documentation is wrong or the code is wrong. Bug has probably always existed. I can currently trace it as far back as existing in .NET Framework 4.0. Bug still exists in .NET 5.
Configuration
All .NET Versions. All OSes.
Regression?
No
Other Information
It may or may not be a bug in .NET Core but it's not going to get fixed so the documentation should be updated. See linked issue.