Warum ist throw null keine Compiler-Warnung? [Duplikat]

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: Warum ist throw null keine Compiler-Warnung? [Duplikat]

by Guest » 12 Jan 2025, 12:17

Warum ist throw null in C# keine Compilerwarnung?

Ich habe Code gesehen, der einen throw null; enthielt. Dadurch wird eine neue NullReferenceException ausgelöst.

Warum sollte der Compiler dies nicht mit einer Warnung kennzeichnen?

Top