Total .NET Analyzer Rule Documentation  

MemberBodyTooLong Rule

Consider breaking excessively long member bodies into smaller members.

Remarks

Excessively long code in a member often causes hidden defects, and leads to code that is difficult to understand, debug, and maintain. To keep your code manageable, you should minimize the length of code in methods, properties, functions, and other member types. In addition, the .NET JIT Compiler performs better with short methods.

Total .NET Analyzer identifies member bodies that exceed the max length specified in the Rule Editor. The default max length for member bodies can be changed as desired.

(Note that by default, Total .NET Analyzer ignores the InitializeComponent member, which is automatically generated by the Windows Form designer. You can override this behavior through the Rule Editor.)

Resolution

Consider making the member body shorter by breaking one large member into several smaller members.

See Also