Wie kann ich eine Ausnahme mit einem bestimmten HRESULT machen?

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Wie kann ich eine Ausnahme mit einem bestimmten HRESULT machen?

by Anonymous » 27 Feb 2025, 11:25

Ich möchte den folgenden Code testen: < /p>

Code: Select all

private bool TestException(Exception ex)
{
if ((Marshal.GetHRForException(ex) & 0xFFFF) == 0x4005)
{
return true;
}
return false;
}
Ich möchte das Ausnahme -Objekt einrichten.>

Top