We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 434fff6 commit 6d664b6Copy full SHA for 6d664b6
src/coreclr/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs
@@ -121,7 +121,7 @@ private static void OAFailed(int hr)
121
throw new DivideByZeroException();
122
case HResults.COR_E_OVERFLOW:
123
throw new OverflowException();
124
- case HResults.TYPE_E_TYPEMISMATCH:
+ case unchecked((int)0x80020005): // DISP_E_TYPEMISMATCH
125
throw new InvalidCastException(SR.InvalidCast_OATypeMismatch);
126
case HResults.E_INVALIDARG:
127
throw new ArgumentException();
0 commit comments