Tuesday, March 16, 2010
Refactoring does not work
So, I wrote a method, with every intention of refactoring it to make it reusable at the end. Now I needed to change some stuff by hand because it passes the top level object in, if I have an object heirarchy. I don't mind that. However, because I had to change several values, it added a number of out parameters. The only issue with this is, all my values are only optionally modified. Therefore, the autogenerated code does not compile. The solution ? Just changing 'out' to 'ref'. Given that 'ref' code will compile where 'out' will not, why not just use 'ref' ?