Saturday 15 August 2015

c# - Why doesn't obj ?? null cause an compiler warning -


In the case where the reference type has been processed with zero, why is not the compiler alert in the C # compiler? Is there a case where it makes sense?

  obj2 = obj ?? Zero;    

Your example really does not understand, but something like this does; d = a ?? B ?? C ?? Zero;

Here, I am saying that all three have to take unrestricted value, if they are all empty, then just be empty.

No comments:

Post a Comment