Microsoft® Visual Studio® 2010 Samples

Explore Visual Studio samples to get up-to-speed quickly with the Visual Studio 2010!


MSDN Online Samples

The most up-to-date samples are always available online through the Visual Studio 2010 Samples page.

Be sure to check back often for the latest updates to samples, along with new samples as they are released!


Samples on Disk

Samples for Visual Basic, Visual C#, Visual C++ and more are available in local .zip files in the location where you installed Visual Studio:

Note: To build the samples, you must extract the .zip files to a folder to which you have write access.
  1. Select the .zip file containing the samples you want to open from the local Samples folder.
  2. Right-click the .zip file and then click Extract All... to extract the samples to a folder of your choice, such as My Documents or your Desktop.

Auto Implemented Properties Sample

To run this sample
  • Press F5.
Demonstrates

This sample contains two source files showing similar source code, one using auto implemented properties and the other using the existing expanded property syntax.  

The use of auto implemented properties reduces the amount of code required to implement to most common property usage scenario and expanded property syntax is still supported for legacy code and more complex property scenarios.

This example also uses the implicit line continuation, object and collection initializers features.