Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you advise me a resource with LINQ/lambda code exercises? [closed]

Can you advise me an a resource with simple C# LINQ/lambda-expressions code exercises?

Desirable but not obligatory: online, free, with answers, step by step, the simplest and fast, to study the syntax but not complicated puzzles or world problems.

I do not think it is duplicated with

  • Learning C# with exercises, questions and puzzles

since it was 2+ years ago, so propably outdated, and it did not contain any good reference (looked through all of them).

The best google search result I managed to find is:

  • C# exercises and solutions-C# variables and data types

though I am not satisfied.

Update:
Something similar to LINQ Quiz which is for me the best reference I could find to this moment.

like image 322
Fulproof Avatar asked Feb 14 '13 16:02

Fulproof


People also ask

Which is better lambda or LINQ?

Adding with Kristin's answer, There is no difference in performance because after compile they generate same IL code for the same query. Language Integrated Query (LINQ) is feature of Visual Studio that gives you the capabilities yo query on the language syntax of C#, so you will get SQL kind of queries.

Which is faster LINQ or lambda?

There is no performance difference between LINQ queries and Lambda expressions.

What is lambda and LINQ?

LINQ is a library that contains a set of extension methods (mostly to IEnumerable) that makes heavy uses of lambdas. The lambda is itself an anonymous delegate and is just simple syntax sugar. It gives you an easy way to define a function "in line" and pass that function to some method.


2 Answers

A very good ressource for LINQ is Jon Skeet's blog "Reimplementing LINQ to Objects". He reimplements the whole LINQ functionality step by step giving excellent insights about the inner workings.

Reimplementing LINQ to Objects

like image 138
Alex Avatar answered Sep 21 '22 13:09

Alex


This is not a tutorial of such but I've found it very usefull for the linq side of things...

http://code.msdn.microsoft.com/101-LINQ-Samples-3fb9811b

like image 33
Equinox2000 Avatar answered Sep 22 '22 13:09

Equinox2000