Here is the listing of C# programming examples on LINQ.
1. C# Examples on Applications of LINQ
LINQ is language integrated query which allow programmers to query various objects without worrying about underlying implementations of these objects. File extension is the suffix that is given to a filename. Numbers ending in 1,3,5,7,9 are called Odd numbers. IEnumerable is the Interface that implements GetEnumerator. The method GetEnumerator is called when the class implements IEnumerable and a new object is returned which can be used in the foreach loop. The following programs perform counting anf grouping of file extensions, determines the file size, performs implementation of IEnumerable Interface and gives a set of odd numbers using LINQ.
2. C# Examples on the Usage of LINQ in SQL Clauses
The FROM clause provides a set of tables that contain information that the queries refer to for selection. WHERE clause specifies the conditions on the basis of which rows are returned. SELECT clause provides the fields and expressions to be displayed into the results of a query. The following programs show the usage of SELECT, FROM and WHERE clauses by printing the student details in a class, printing the largest and smallest numbers in an array.