Many developers don't know about how to remove un-used code and block. Visual Studio giving facility to resolve this.
The following are the rules:
- Private methods that are not called from any other code (CA1811)
- Unused local variables (CA1804)
- Unused private fields (CA1823)
- Unused parameters (CA1801)
- Internal classes that are not instantiated from any other code (CA1812).
Steps to add code analysis rule
Right click on Project solution > select Property
There you can see code analysis settings
Apply setting as per you requirement.
To know more on Remove Unused/Dead Code Using Visual Studio
No comments:
Post a Comment