Visual Basic Sample Applications

In the Visual Basic documentation, a sample is a Visual Basic project you can load into Visual Studio and run. An example is a small block of code that demonstrates a single, limited programming task. A snippet is a block of code that is inserted in the Code Editor using the IntelliSense Code Snippet feature.

To access samples from Visual Studio

  1. On the Help menu, click Samples.

  2. In the Samples on Disk section of the readme file, click local Samples folder. By default, the samples are installed in drive:\Program Files\Microsoft Visual Studio 10.0\Samples\1033 or drive:\Program Files (x86)\Microsoft Visual Studio 10.0\Samples\1033.

  3. Right-click the .zip file that contains the samples you want to open and then click Extract All to extract the samples to a folder of your choice.

For the most current samples, see the Visual Basic Samples Web site.

Security noteSecurity Note

Microsoft provides the included samples "AS IS" with no warranties. The code in the samples is provided just to illustrate concepts. The provided code may not meet security requirements for any specific environment. We recommend that you add security and error-handling code to your projects to make them as secure and robust as you deem appropriate.

The following table describes samples that demonstrate new features in Visual Studio 2010.

Sample

Description

Auto-Implemented Properties

Demonstrates how to define and use auto-implemented properties. For more information, see "Properties and Fields" in Object-Oriented Programming (C# and Visual Basic).

Collection Initializers Sample

Shows how you can use collection initializer syntax to create arrays and collections. For more information, see Collection Initializers Overview (Visual Basic).

Covariance Sample

Shows how to create and use covariant and contravariant interfaces. For more information, see Covariance and Contravariance (C# and Visual Basic).

Implicit Line-Continuation Sample

Demonstrates the advantages of the implicit line-continuation feature, which enables you to continue a statement on the next consecutive line without using the underscore character (_). For a list of syntax elements for which the line-continuation character can be omitted, see "Implicit Line Continuation" in Statements in Visual Basic.

Lambda Expressions Sample

Demonstrates how to use single-line and multi-line lambda expressions. For more information, see Lambda Expressions (Visual Basic).

Visual Basic Application Samples

Describes samples that demonstrate project, user, and assembly tasks.

Visual Basic Data Samples

Describes samples that demonstrate data access.

Visual Basic Windows Forms Samples

Describes samples that demonstrate Windows Forms applications.

Visual Basic Language Samples

Describes samples that demonstrate Visual Basic language concepts.

Visual Basic Server Component Samples

Describes samples that demonstrate applications that interact with Windows operating-system components.

Visual Basic Security Samples

Describes samples that demonstrate security tasks.

Visual Basic Tablet PC Samples

Describes samples that demonstrate important features of Tablet PC technology.

Visual Basic Windows Communication Foundation Samples

Describes samples that demonstrate common tasks for Windows Communication Foundation applications.

How to: Install and Troubleshoot Database Components for Samples (Visual Basic)

Explains how to install the sample databases used in the samples.

LINQ Samples

Describes the Language-Integrated Query (LINQ) samples for Visual Basic, which are located in the VB Samples\Language Samples\LINQ Samples folder of the VBSamples.zip file.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft