. Net uses the record about Linq today, And. net uses linq today.
I have been in touch with. net since my internship for more than half a year. Today, I have encountered a problem with LINQ in my project.
So I searched the internet and found out here to make it easier for me to view 0_0.
Language Integrated Query is a set of extensions for c # and Visual Basic languages.
It allows you to write C # Or Visual Basic code to query memory data in the same way as a database.
Some extensions that can be implemented by LINQ
Where, Max, Select, Sum, Any, Average, All, Concat, etc.
Small example on the Internet
List <int> arr = new List <int () {1, 2, 3, 4, 5, 6, 7 };
Var result = arr. Where (a =>{ return a> 3 ;}). Sum ();
Console. WriteLine (result );
Console. ReadKey ();
LINQ traversal DataTable filtering data
// All Student Information
DataTable stu_dt = new ClassDap (). GetAllXJ ();
// Query using the Select Method
String stuName = stu_dt.Select ("f_x133 = '" + "condition" + "'") [0] ["f_xm"]. ToString ();
String classId = stu_dt.Select ("f_xsid = '" + "condition" + "'") [0] ["f_bj"]. ToString ();