Introduction to Visual Basic 9 about LINQ in the incomplete introductory

Source: Internet
Author: User
Tags new features visual studio

What is LINQ?

The official Chinese name for LINQ is ". NET language Integration query," which is all called language-integrated query. It provides traversal, filtering and projection functions similar to SQL syntax, and is the most important new technology in the Visual Studio orcas&.net Framework 3.5. Not only does LINQ complete queries on objects, it can manipulate the database through DLinq, or control XML through XLinq. Both Visual Basic 9 and C # 3.0 fully support LINQ. Now we can show the exciting new features of LINQ through a small piece of code.

LINQ Example 1

Dimlistasstring () ={"abc", "Def", "Ght"}

' Did you see that? '

dimresult=fromtasstringinlistwheret= "ABC"

' Output data, result type is IEnumerable (Ofstring)

Console.Write (Result (0))

Here, I used a part of the syntax sugar in Visual Basic 9 to simplify the code.

LINQ Advanced Application

In fact, there are differences between LINQ and T-SQL, such as from predecessors, and Select at the end. Although this is based on the IDE's IntelliSense considerations, it still feels slightly uncomfortable. LINQ also supports a large number of SQL syntax, such as ORDERBY,GROUPBY, and a batch of statistical functions such as AVG, Sum, Count, and so on. You can explore the rest of the section yourself. Of course, you first want to download and install Visual Studio Orcas Beta 1.

Restudying

Visual Basic 9 Incomplete Introductory series (1): Grammar candy

Visual Basic 9 Incomplete Getting Started series (2): Syntax enhancement

Conclusion

LINQ is worthy of the core enhancements in. Net Framework 3.5, and the performance of LINQ is already evident, combined with the support of anonymous types. For some time to come, I think it should be an important technology in the. Net World. You can also take a look at some of the information listed in the article to help you explore LINQ further. At the same time, this essay also experienced a twists and turns, because in the upcoming release, keyboard problems, resulting in the second half of the essay is lost, unable to recover, had to hastily received pen.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.