Resharper (paired with StyleCop) has made me a bit of a neat freak when it comes to obeying most of its rules. One of the rulesets (I believe from StyleCop) enforces putting public functions first, then protected static, then protected, then private static, and finally private.
The private functions are typically the ones backing up the functionality of the public functions as helpers. Let's say I have the StyleCop-enforced order of functions below:
public FunctionA
public FunctionB
private FunctionAHelper1
private FunctionAHelper2
private FunctionBHelper1
private FunctionBHelper2
...though that's not so bad, I find myself wanting to keep the supporting private methods close to the function that's calling them, so it looks more like this:
public FunctionA
private FunctionAHelper1
private FunctionAHelper2
public FunctionB
private FunctionBHelper1
private FunctionBHelper2
What have you learned that guided the organization of methods in a class? What is StyleCop's reasoning for wanting the public/protected/private ordering? Does it really come down to a matter of preference, or are there benefits I'm not seeing?