这些电话等同吗?
Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());throw new Win32Exception();发布于 2015-01-16 15:17:59
它们是不对等的。
Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error())抛出一个COM异常。这可能是System.Runtime.InteropServices.COMException或适用于Win32错误代码的异常。throw new Win32Exception()抛出一个Win32异常,System.ComponentModel.Win32Exception。https://stackoverflow.com/questions/27986960
复制相似问题