Figure 3-2 shows what the New Project dialog should
look like.
Figure 3-2
Click OK when you have everything set. Next, open the Solution Explorer and add the System.Data and
System.Data.Linq namespace references to your project. Then open Form1 in design view and add three
buttons and a list box. Align the list box on the left of the form and place two of the buttons next to the
list box, with the third button in the bottom-right corner of the form.
Set the properties of the first button to the following:
Property Value
Name cmdQuerySyntax
Text Query Syntax
45
Part I: Introduction to Project LINQ
Set the properties of the second button to the following:
Property Value
Name cmdMethodSyntax
Text Method Syntax
Set the properties of the third button to the following:
Property Value
Name cmdClose
Text Close
Figure 3-3 shows what the form should look like (with the appropriate component references included).
Figure 3-3
Double-click the form to display the code behind the form. In the declarations section, make sure that
you add the appropriate using statements for LINQ, including System.
Pages:
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112