Monday, 26 August 2013

Instantiating Null Objects with Null-Coalescing Operator – programmers.stackexchange.com

Instantiating Null Objects with Null-Coalescing Operator –
programmers.stackexchange.com

Consider the following typical scenario: if(myObject == null) { myObject =
new myClass(); } I'm wondering what is thought of the following
replacement using the null-coalescing operator: ...

No comments:

Post a Comment