Distinguish between a null array and an empty array

bauss jj_1337 at live.dk
Sun May 24 12:12:31 UTC 2020


Is there a way to do that?

Since the following are both true:

int[] a = null;
int[] b = [];

assert(a is null);
assert(!a.length);

assert(b is null);
assert(!b.length);

What I would like is to tell that b is an empty array and a is a 
null array.


More information about the Digitalmars-d-learn mailing list