There are 13 entries for the tag Linq

Linq Challenge in C++

Taking what seems to be a simple LINQ task (in C#) and converting it to C++.

Releasing Email File Attachment Resources (System.Net.Mail)

Lesson learned about releasing attachment resources with System.Net.Mail.

GridView from LINQ to Objects

A technique for displaying results from LINQ to an ASP.NET GridView.

Playing with Enumerable.Range (System.Linq)

Here's an example of something fun and useful with Enumerable.Range in four different languages.

Ruby-Like "times" method #ruby #csharp #linq #vb #cpp

Here's the implementation of the Ruby-like "times" method that executes a block of code (n) times.

Enumerable::ToList() - C++ Missing From MSDN

It seems the C++ code example for Enumerable::ToList() is absent/missing from MSDN. Here is my version of the missing example for Enumerable::ToList();

Linq Distinct and Custom Object Sort

I've seen a lot of posts of people having problems using Distinct() and/or Sort() with custom objects. Here is an example showing an implementation of both (in C++, C# and VB). This post includes custom Compare methods, the implementation of Distinct() and the use of List.ForEach in the 3 main dot net languages.


There are many times where I need to convert an array of data into a Dictionary or Hash table. If the key to be used in the new Dictionary is not unique, it is necessary to manage duplicates. I previously went through a lot of gyrations, but eventually setteled on the ILookup. ILookup is not perfect, but it beats some alternatives.

Web Services Call including the XML and Linq namespaces

This (console app) example calls to two different web services. One of which returns raw XML as the result and the other returns a regular (pre-parsed) object. This can be used as a reference for XML and SOAP and a minor LINQ reference.

Linq to XML Example (Parsing RSS XML)

A utility for demonstrating Linq to XML that downloads MP3 Podcasts of DotNetRocks.

CSharp (C#) String Test

Playing around with Strings in C#.

C++ and LINQ (round 1)

Here is an experiment with Linq in C++.

Killing C++ (dot net)?

C++ does not seem to be getting much love in the new .NET.