Home
Blog
This Is My Favorite C# Feature
Updated
Dot Net Perls

This Is My Favorite C# Feature

I have been writing about C# code for many years, and it has been a popular subject among developers. The language has kept becoming larger and more complicated with each release, but one feature from many years ago is still my favorite.

The word LINQ stands for Language Integrated Query. Think of database (SQL) queries, and how you can find (select), sort and filter or even join together results from a database. With LINQ, we can do this inside the C# language itself, on object collections like Lists.

With some syntax additions to the language, we can:

Use "from" to have a query similar to a natural language question.
Use "order by" to sort the results.
Use "select" to specify how we want to have the results arranged.

With queries similar to natural language, we can say "from this list, order items alphabetically and select items with this matching condition." In no other language have I found the same built-in quality of queries as in C#. While I might not love other aspects of C#, LINQ (System.Linq) is my favorite.

Dot Net Perls is a collection of pages with code examples, which are updated to stay current. Programming is an art, and it can be learned from examples.
Donate to this site to help offset the costs of running the server. Sites like this will cease to exist if there is no financial support for them.
Sam Allen is passionate about computer languages, and he maintains 100% of the material available on this website. He hopes it makes the world a nicer place.
No updates found for this page.
Home
Changes
© 2007-2025 Sam Allen