Visual Studio 411

August 16, 2007 at 9:14 am | Posted in .Net, C#, Visual Studio | Leave a comment

Visual Studio has a powerful array of features that can greatly boost productivity–especially for new programmers who may not have a full grasp of the .Net framework.  While the C# language itself is quite compact and comprehensible, the number of classes available in the .Net framework is almost mind boggling.  How is a newcomer supposed to remember it all?

The good news is that with Visual Studio you don’t have to.  You just need to know how to get the information (‘411’) when you need it.  Here are the most helpful features for me:

Intellesense

There are three big productivity enhancements that I get out of Intellesense.  First, I use it to help find out what is possible with an object.  By typing a ‘.’ after the object name in a statement, the Intellesense drop down shows all of the properties and methods that are available to me.  Icons by the names of the members indicate the type (properties: a page with a hand, methods: a diamond, events: a lightning bolt).  Second, selecting one of the members gives a brief synopsis which includes the type of value returned and the arguments that are expected.  After selecting, if I type another delimiter (a space, a dot, a parenthesis), Intellesense will  enter the code for me reducing the possibility of making a typographical mistake.  For methods, entering the open parenthesis results in Intellesense showing the possible overloads (different argument possibilities).  Intellesense is almost like having an expert programmer sitting over your shoulder advising you every step of the way.

Dynamic Help

Dynamic help is a way of quickly getting to more information from the MSDN documentation file.  Turn this feature on using menu Help > Dynamic Help.  Now, when you click on an item in the code view or the designer view, a list of links to the Help documentation is presented.  Click on a link and most likely you will get exactly the information you are seeking.

MSDN Documentation

Newcomers need to understand the format of the help documentation so as not to be overwhelmed by its scope.  Every class typically has the following organization: an overview page, a members page listing all properties, methods and events, finally leading to pages for individual members.  More often than not, the individual members page will offer an example that can be adapted or even copied directly into the application.

Index

For me, the most useful way of getting to the information in the documentation (outside of dynamic help) is to use the Index: menu Help > Index.  Also available are ‘Search’ and ‘Content’ but ‘Index’ works best for me.

How do I

Help > How do I can also lead to helpful articles in the documentation for doing the most common tasks like File IO or drawing.

Getting Help Online

Outside of Visual Studio there is a wealth of information.  If I have a question about a control or how to do something, chances are good that someone else has had the same problem and has already posted the solution.  I usually fire up a search engine and put in a few keywords about the problem along with ‘msdn’.  This biases the search to either the msdn documentation or one of the msdn forums.

For me, asking a question in an online forum is my option of last resort.  Not that it is a bad thing to do but the time I spend using the other resources available is always a valuable learning experience in itself and can turn up nuggets that can be used in later projects.

Advertisements

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: