In my previous posts on the productivity improvements in Visual Studio 2010, I've focused on features that all VS developers can take advantage of. Sometimes, though, the most useful features are those that are specific to the development language you're using or platform you're developing for. After all, C++ developers often need different features than C# developers, and web developers have different requirements from Windows developers.
Today's post focuses on a few enhancements meant just for you Windows C++ and web developers.
MFC Class Wizard
If you are a Microsoft Foundation Classes (MFC) developer, you'll probably have fond memories of the MFC Class Wizard from days past. Once again, you can invoke the MFC Class Wizard by typing Ctrl+Shift+x when you're in an MFC class, and you'll see options appropriate for the class you're working on. The wizard shows your class name, location, project, inheritance, and other information about your class. It also allows you to handle messages, add methods and member variables, or override virtual functions.
The MFC Class Wizard can also help you navigate your code by taking you to the files that contain your classes, header declarations, methods, and members. Below, you can see some of the ways the wizard allows you to navigate your code.
Web Code Snippets
Even though you may build webpages commonly, sometimes the syntax for an HTML tag or ASP.NET control can elude your memory. In Visual Studio 2010's webpage markup editor, the fastest way to add HTML, MVC, and ASP.NET controls and tags to markup is using the web code snippet feature. Type Ctrl+K+X and you'll get a small window offering a list of snippets from ASP.NET, MVC, and HTML.
You can arrow around and use letters to navigate the list quickly, and then tab to insert the tag or control into your page. Below, I chose to insert an ASP.NET ListView control.
But what about dynamic prototyping? If I dynamically prototype a variable, IntelliSense picks up the prototype members and adds them to the selection dropdown list for me. In this snippet, I've added the createNewBike function to Object. createNewBike takes in an object as a parameter and uses it as the returned object's prototype, adding all of its members to the object. Below, the returned newbike shows all the members of bike in IntelliSense.
In my next post on Visual Studio 2010's productivity improvements, we'll focus on extensions to Visual Studio 2010 that help you customize the IDE to fit your needs.