"Long stretch of imperative code however does not separate well and probably should remain a very large function."
As someone who uses Resharper's Extract Method a lot this is a nice counterexample to where it's probably inappropriate
As someone who uses Resharper's Extract Method a lot this is a nice counterexample to where it's probably inappropriate
Often I find the best way to simplify large functions is to tear out sub-blocks and give them name. Loops or large conditional blocks are usually easy to tear out and can usually get very meaningful names. Long stretch of imperative code however does not separate well and probably should remain a very large function.