Monday, May 19, 2008
While crawling around in VS 2008 to work on the P2P presentation for RockNUG and the NOVA Code Camp, I stumbled upon a lovely little feature under Intellisense on the Edit menu called Organize Usings.  A simple click can remove unused using statements, sort the statements or do both.  Cleans up code faster than a life style diva on a nicotine binge.

Visual Studio has default templates for all project items and they frequently includes using statements for namespaces, that well, never get used.  The class template, for example really, really wants you to use the LINQ and the System.Text namespaces. If you haven't gotten around to modifying the default templates, you'll have lots of unneeded using statements cluttering up your code.  The Organize Usings feature can help save other developers (or the future you) from wondering, "Where the heck did he use LINQ in this class?".

And just so you don't strain yourself, it is only available for C#.

Monday, May 19, 2008 11:52:34 AM (Eastern Standard Time, UTC-05:00)   #     Comments [0]  | 

Theme design by Dean Fiala

Pick a theme: