Code smell – many usings

If you see some code like this, you know there is something very wrong.



Why on earth should I have to deal with System.Xml, System.Threading, System.IO, System.Diagnostics, System.Runtime.InteropServices, System.Security.Cryptography, System.Net, System.Net.Sockets in a Form class?

Print | posted on Friday, November 28, 2008 9:55 AM


# re: Code smell – many usings

Left by Roy Lawson at 12/1/2008 2:09 PM
Gravatar A refactoring tool like Resharper will help you quickly identify references that you aren't using in your code.

# re: Code smell – many usings

Left by Changhong at 12/1/2008 6:20 PM
Gravatar Roy - I think you miss-understood my point. All the references there are used, and it is a clear sign of breaking Single Responsibility Principle.

# re: Code smell – many usings

Left by benchfolks at 9/19/2017 12:58 AM
Gravatar Valuable info. Lucky me I found your website by accident. I bookmarked it. This code is easily understandable and I have learned a lot of things from it. thanks for the post. you can also check BENCHFOLKS for further details.

# re: Code smell – many usings

Left by Anna Shetty at 2/26/2018 4:23 PM
Gravatar Through your pen I found the problem up interesting! I believe there are many other people who are interested in them just like me! Thanks your shared! I hope you will continue to have similar posts to share with everyone! I believe a lot of people will be surprised to read this article!
play cool math games

Your comment:


Copyright © Changhong Fu

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski