tagged [lambda]
Group by with multiple columns using lambda
Group by with multiple columns using lambda How can I group by with multiple columns using lambda? I saw examples of how to do it using linq to entities, but I am looking for lambda form.
- Modified
- 12 Sep at 10:53
Syntax behind sorted(key=lambda: ...)
Syntax behind sorted(key=lambda: ...) I don't quite understand the syntax behind the `sorted()` argument: Isn't `lambda` arbitrary? Why is `variable` stated twice in what looks like a `dict`?
- Modified
- 24 Apr at 21:58
FindAll vs Where extension-method
FindAll vs Where extension-method I just want know if a "FindAll" will be faster than a "Where" extentionMethod and why? Example : or Which is better ?
- Modified
- 7 Oct at 14:17
Difference between lambda expression and method group
Difference between lambda expression and method group What's the difference between and ? Resharper suggests to use the first expression.
- Modified
- 3 Jul at 12:11
How to return value with anonymous method?
How to return value with anonymous method? This fails with the error > Cannot convert lambda expression to type 'string' because it is not a delegate type What does the error mean and how can I resolv...
Objective-C code blocks equivalent in C#
Objective-C code blocks equivalent in C# How would I write the equivalent code in C#:
- Modified
- 28 Apr at 19:29
Why would you use Expression<Func<T>> rather than Func<T>?
Why would you use Expression> rather than Func? I understand lambdas and the `Func` and `Action` delegates. But expressions stump me. In what circumstances would you use an `Expression>` rather than a...
- Modified
- 19 Apr at 13:53
Simple Examples of joining 2 and 3 table using lambda expression
Simple Examples of joining 2 and 3 table using lambda expression Can anyone show me two simple examples of joining 2 and 3 tables using `LAMBDA EXPRESSION(` for example using Northwind tables (Orders,...
- Modified
- 27 May at 10:9
GroupBy in lambda expressions
GroupBy in lambda expressions How would you write the above as a lambda expression? I'm stuck on the `group into` part.
Can a lambda expression be declared and invoked at the same time in C#?
Can a lambda expression be declared and invoked at the same time in C#? In VB.NET, a lambda expression can be declared and invoked on the same line: Is this possible in C#?
.NET / C# - Convert List to a SortedList
.NET / C# - Convert List to a SortedList What is the best way to convert a List to SortedList? Any good way to do it without cycling through it? Any clever way to do it with an OrderBy()? Please read ...
- Modified
- 11 Jun at 17:24
FirstOrDefault returns NullReferenceException if no match is found
FirstOrDefault returns NullReferenceException if no match is found Here is my code: The code works fine if `x.Value.ID` matches `options.ID`. However, I get a `NullReferenceException` if it doesn't.
How to remove a lambda event handler
How to remove a lambda event handler I recently discovered that I can use lambdas to create simple event handlers. I could for example subscribe to a click event like this: But how would you unsubscri...
- Modified
- 20 Nov at 10:35
Lambda expression with a void input
Lambda expression with a void input Ok, very silly question. is a lambda representing the same thing as a delegate for But what is the lambda equivalent of ?? Thanks a lot!
Lambda Expression: == vs. .Equals()
Lambda Expression: == vs. .Equals() This is a purely academic question, but what's the difference between using == and .Equals within a lambda expression and which one is preferred?
Select every second element from array using lambda
Select every second element from array using lambda C# 4.0. How can the following be done using lambda expressions?
loop for inside lambda
loop for inside lambda I need to simplify my code as much as possible: it needs to be one line of code. I need to put a for loop inside a lambda expression, something like that:
How to cast Expression<Func<T, DateTime>> to Expression<Func<T, object>>
How to cast Expression> to Expression> I've been searching but I can't find how to cast from the type to the type: So I must turn again to the SO vast knowledge ;)
linq to sql join on multiple columns using lambda
linq to sql join on multiple columns using lambda Can someone help me to translate this into lambda query? Thanks.
How do I use lambda expressions to filter DataRows?
How do I use lambda expressions to filter DataRows? How can I search rows in a datatable for a row with Col1="MyValue" I'm thinking something like But of course that doesn't work!
Expression Tree Copy or Convert
Expression Tree Copy or Convert How to convert a ExpressionTree of form to where POCO1 and POCO2 are C# objects and both have Int32 Age property
- Modified
- 5 Jan at 07:49
Lambda expression "IN" operator Exists?
Lambda expression "IN" operator Exists? I'm looking for to build the Lambda expression like the below I don't find any `IN` operator in Lambda expression. Anybody have suggestions?
- Modified
- 22 Nov at 07:54
Do I need to kill a thread written like this? Or will it automatically end?
Do I need to kill a thread written like this? Or will it automatically end? Using code like the code below, will the new thread created end on its own after the function returns? I'm pretty new to thr...
- Modified
- 17 Mar at 15:38