Chương này xem xét một số điều khiển quan trọng, hình thức, và các sự kiện. Một số khái niệm dễ hiểu hơn nếu bạn biết một ngôn ngữ lập trình, tuy nhiên, không có lý do bạn không thể chọn công cụ này trong khi bạn đi cùng. Chấp nhận dữ liệu trong một điều khiển TextBox | 104 Part II Immersing Yourself in Data__ The preceding Select clause tells .NET to return the Id ProcessName and PrivateMemorySize64 properties from each object represented by the iteration variable p . A Where clause filters the results by saying Return only those processes that use more than one million bytes of memory. However a careful look at the Where clause shows that it s using PrivateMemorySize64 for the filter not . Why not include the iteration variable In LINQ queries it s all about scope what s in and what s out. In this case the Select clause narrows the scope to the three properties. And the p variable As a mobster would say Fuggedaboutit The p has gone out of scope and can no longer be used. After the Select clause in this example the Where clause can access only Id ProcessName and PrivateMemory Size64. Here s a version of the memory snooper with the Where clause first Dim q From p In _ _ Where 1000000 _ Select This time you use the iteration variable p to filter the results because that s what is in scope. Nothing in the Where clause reduces what s available. If your queries aren t working and IntelliSense isn t cooperating with the member names from the iteration variable check whether a Select clause has taken the iteration variable out of scope. Filtering with an Eye on Strings Visual Basic gives you several ways to filter the results of a query based on what s in a string of text. This section shows the use of operators and methods including Like Contains EndsWith and StartsWith . Choosing what you Like The follow code examines the ServerVariables collection in the Request object and uses the Like keyword to look for the text SERVER. Chapter 7 LINQ as a Data Language 105 Dim q From sv As String In Select sv _ Where sv Like SERVER q .