Database Reference
In-Depth Information
Figure 18-8. XML document
Try It: Coding a Simple LINQ to XML Query
In this exercise, you'll use LINQ to XML to retrieve element values from an XML document.
1. Navigate to Solution Explorer, right-click the Linq project, and select Windows
Form. In the opened Add New Item dialog, make sure Windows Form is
selected, and then rename Form1.cs to LinqToXml. Click Add.
2. Select the LinqToXml form by clicking the form's title bar, and set the Size
property's Width to 377 and Height to 356.
3. Drag a TextBox control onto the form, and position it at toward the center of
the form. Select this TextBox, navigate to the Properties window, and set the
following properties:
 
Search WWH ::




Custom Search