Note: The custom rules API is likely to change in the next version of FxCop/Visual Studio.
Currently, the locals of a method are stored in a pseudo-instruction in the method's InstructionList. We plan to change this in a future version of the tool and the locals will directly hang off the method.
To access them, do the following:
In FxCop 1.35, the LocalList is foreachable.