I'm still working on this one but is does give some good results already. This only returns results if the code it is checking has been compiled in debug mode. I couldn't find any way of determining whether local variables were compiler generated or not besides when there is a .pdb associated with the assembly.

In the fullness of time, this rule should catch variables that are always set to stronger types than they are declared. The rule should also catch when the value(s) returned from a method are stronger than the defined method return type.

Last edited Dec 26, 2010 at 11:11 PM by JeffLeBert, version 1

Comments

No comments yet.