Refactoring Tips - Tip 1






4.56/5 (2 votes)
I actually prefer initialization over assignment, like this:private void Method(){ int Var2; int Var3; // some more statements int Var1(10);}In doing this you prevent later edits to again separate the declaration from the assignment by inserting code between them.
I actually prefer initialization over assignment, like this:
private void Method() { int Var2; int Var3; // some more statements int Var1(10); }In doing this you prevent later edits to again separate the declaration from the assignment by inserting code between them.