B
bobby_b_
I have been told that when creating an object as a local variable, it
is better to declare the object as null, and then instantiate it.
Example:
MyClass object = null;
object = new MyClass();
instead of
MyClass object = new MyClass();
Is this true? Is it better to use that extra line?
is better to declare the object as null, and then instantiate it.
Example:
MyClass object = null;
object = new MyClass();
instead of
MyClass object = new MyClass();
Is this true? Is it better to use that extra line?