How to: View and Download Samples

The sample topics contain options for viewing and copying sample source files, and for downloading sample projects to your computer. Samples are downloaded as zip files.

Each sample topic contains at least one source code selection box that lists all the sample files. There is one box for each programming language provided by the sample. Your language filter settings affect which languages are displayed.

You can also download all the samples from the Internet.

To view, copy, or print a source file

  • Select a source file and click the View Source button.

The file is displayed in a new document window. You can select some or all of the text and copy or print it.


These options are not available on the Web on MSDN.

To download a sample

  1. Click Download Sample.

    The File Download message box appears.

  2. Click Open, and on the left column of the zip folder window, click Extract all files.

    The Extraction Wizard opens.

  3. Click Next. You can change the directory that the files will be extracted to, and then click Next again.

  4. Make sure that the Show extracted files check box is selected, and click Finish.

  5. Double-click the sample's .sln file.

    The sample solution is displayed in Solution Explorer. You might get a security warning that says the solution location is not trusted. Click OK to continue.

To download all the samples from the Internet

See Also


How to: Set Sample Settings

Other Resources

.NET Framework Samples