In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article focuses on "what is the evolution history of .NET methods". Interested friends may wish to take a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how the evolution of .NET methods is.
In recent relatively new projects, LINQtoSQL has begun to be used heavily. LINQ is designed to be a unified standard for accessing different types of data sources in .NET. Personally, I do not agree with it, nor do I hope so. Sometimes, a huge antivirus software is not as portable as a dozens of K special killing tools. Of course, the advantage of LINQ lies in the processing of structured data.
So there is:
LINQ to Object
LINQ to XML
LINQ to SQL
One of the common characteristics of these target data sources-strong structure.
Trace Lambda from LINQ
/ / LINQtoObject IEnumerablefilteredResult=fromcustomerincustomers wherecustomer.FirstName== "Donna" selectcustomer
Above is a very simple LINQtoObject. Some people will say, this is about the same amount of work as I use a foreach! If you think so, you underestimate him. With the improvement of join..onorderbyletnestingwhere and efficiency, that's not a little bit.:)
Specific examples do not need to be given. Just click on it.
Filter in LINQ is evolved from LambdaExpression.
With a slight change in the above example, you can see our cordial Lambda.
Lambda at LINQ / / StatementLambdasinLINQ IEnumerablefilteredResult= (fromcustomerincustomers selectcustomer) .Where (c = > c.FirstName.Equals ("Donna"))
Trace Delegate from Lambda
LambdaExpression is an amazing thing in C # 3.0, which evolved from anonymous functions in C # 2.0. At the same time, it also plays the role of anonymous functions. With it, we don't even have to specify the type of parameter.
BubbleSort (items, (firstItem,secondItem) = > {returnfirstItem})
Think back to how we used anonymous functions in Cnotify 2.0:
BubbleSort (items, delegate (intfirstItem,intsecondItem) {returnfirstItem}); at this point, I believe you have a better understanding of the evolution history of .NET methods, so you might as well do it in practice! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.