An Extensive Examination of LINQ: The Standard Query Operators

Posted by: 4GuysFromRolla.com Headlines, on 01 Apr 2009 | View original | Bookmarked: 0 time(s)

Query operators are methods that work with a sequence of data and perform some task based on the data. They are created as extension methods on the IEnumerable<T> interface, which is the interface implemented by classes that hold enumerable data. For example, arrays and the classes in the System.Collections and System.Collections.Generic namespaces all implement IEnumerable<T>. In The Ins and Outs of Query Operators we looked at how to create your own query operator that, once created, can be applied to any enumerable object.

While it is possible to create your own query operators, the good news is that the .NET Framework already ships with a bevy of useful query operators. These query operators are referred to as the standard query operators and are one of the primary pieces of LINQ. The standard query operators include functionality for aggregating sequences of data, concatenating two sequences, converting sequences from one type to another, and splicing out a particular element from the enumeration. There are also standard query operators for generating new sequences, grouping and joining sequences, ordering the elements in sequences, filtering the data in a sequence, and partitioning the sequence.

All together, there are more than 40 standard query operators. This article explores some of the more germane ones, giving examples of the standard query operator in use and examining its underlying source code. There are also several demos included in the download available at the end of the article. Read on to learn more!
Read More >

Category: XLinq | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1321 | Hits: 35

Similar Posts

  • Serialising Microsoft StreamInsight QueryTemplates more
  • An Extensive Examination of LINQ: Grouping and Joining Data more
  • An Extensive Examination of LINQ: Using the Query Syntax more
  • An Extensive Examination of LINQ: The Ins and Outs of Query Operators more
  • An Extensive Examination of LINQ: Extension Methods, Implicitly Typed Variables, and Object Initializers more
  • Creating LINQToTwitter library using LinqExtender more
  • LinqExtender 1.4 - Enhanced object tracking more
  • Querying with LINQ to Entities vs ObjectQuery in EF more
  • Athena - A LINQ to flickr API (Release 1.4) more
  • Looking at EF Performance - some surprises more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD