Very simple null reference escape

Amex Amex at gmail.com
Sun Jun 2 07:55:27 UTC 2019


A.B

If A is null, crash.

A?.B : writeln("HAHA");

No crash, ignored, equivalent to

if (A is null) writeln("HAHA"); else A.B;



More information about the Digitalmars-d-learn mailing list