TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

<< Back to C-SHARP

C# LINQ

Review extension methods from the System.Linq namespace. Learn to write queries directly in programs.
LINQ. The bird calls out in search of a mate. It queries the surrounding area with its bird song. With LINQ we formulate queries in our programs.
Query keywords. Query expressions use a whole new set of keywords. These are contextual keywords. This means they only have meaning in query expressions.ascending, descendinggroupjoinletorderbyselect new
Enumerable. The Enumerable type has some useful static methods. If you need an IEnumerable collection of a range or a repeated element, consider Range or Repeat.Range, Repeat, Empty
Extension methods. This is a special syntax form in C#. We can call a method on a variable like it is an instance method. But it is not on the class. It is specified in a separate place.Extension
Notes, syntactic sugar. LINQ can be seen as a form of syntactic sugar. Queries could be written with for-loops. But when a program is easier to read and write, often it is better.
Notes, queries. In query languages, we express what we want, not how it is to happen. The query language, not the programmer, is concerned with the exact implementation details.

Quote: We call this language the query language, because it is very useful for retrieving information from data bases by formulating queries, or questions, expressed in the language (Structure and Interpretation of Computer Programs).

A summary. LINQ is a powerful feature. Its methods and query expressions often improve the readability of programs. And they sometimes lead to new, delayed, superior algorithms.
© TheDeveloperBlog.com
Home
The Dev Codes

Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf