Skip navigation.

Let Your Code Fail EarlyAll recent postsCassini vs IIS

Class View Pane: An Overlooked Visual Studio Gem

For me, a quick way to see if a project is properly structured is to go to View | Class View. This is one badly overlooked but handy Visual Studio tool.

Class View gives you a general idea of whether you created a good namespace structure, whether classes have decent names, etc. This is where you catch bizarre class names like _Default.

For example, below is a screenshot of a brand new site created off the Small Business Starter Kit:

Class View within Visual Studio

Class View reveals that the project is flat like a pancake, no logical structure in sight. The fact that it’s a web site, not a Web Application Project (WAP), somewhat explains this chaos, but that’s a different story (a post is coming, believe me).

Comments

Comment permalink 1 Francois Vanderseypen |
That's a bit disappointing, why didn't you include the actual story or point of view?
Comment permalink 2 RichB |
It's staggering how many people think that adding regions to your code is the best way to group methods, fields, properties when Class View does it for you.
Comment permalink 3 Milan Negovan |
RichB: hear hear! Regions are a good code small just begging for refactoring.
Comment permalink 4 Milan Negovan |
Francois, I do have a real story, but I can't talk about internal projects on the blog. :)

The project above is disorganized in an exact same way.
Comment permalink 5 Paul Mackintosh |
I'm using Visual Web Developer and was looking to get an overview of my ASP.Net page classes (that are within a 'Web Site' template as opposed to class library or 'Web Application') in Class View.

Can I?
Comment permalink 6 Milan Negovan |
Paul, I don't have Visual Web Developer installed, but I believe that Class View is available in every edition of Visual Studio.

Emails and Notifications

Would you like to be notified when somebody responds to this post?  Would you like to have these comments emailed to you?

Submit your comment

Please enter only text since all HTML tags except hyperlinks will be stripped. Hyperlinks will become live links. Any comments with flaming or offensive language will be deleted. Be courteous to other posters. Thank you.

Your name (required):
Your email (optional):
Your site's URL (optional):
Enter this number
Type in the number above:
Comment (required):