I’m using C# on Framework 3.5. I’m looking to quickly sort a Generic List<T>. For the sake of this example, let’s say I have a List of a Person...
  • May 4, 2022
  • 0 Comments
I’m having trouble with a query written in LINQ and Lambda. So far, I’m getting a lot of errors here’s my code: int id = 1; var query =...
  • May 2, 2022
  • 0 Comments
I know how to create a reference to a method that has a String parameter and returns an int, it’s: Function<String, Integer> However, this doesn’t work if the function...
  • April 30, 2022
  • 0 Comments
Is there a better way to get the Property name when passed in via a lambda expression? Here is what i currently have. eg. GetSortingInfo<User>(u => u.UserId); It worked...
  • April 30, 2022
  • 0 Comments
I have to find the average of a list in Python. This is my code so far from functools import reduce l = [15, 18, 2, 36, 12, 78,...
  • April 29, 2022
  • 0 Comments
Using reflection, how can I get all types that implement an interface with C# 3.0/.NET 3.5 with the least code, and minimizing iterations? This is what I want to...
  • April 29, 2022
  • 0 Comments
For a person without a comp-sci background, what is a lambda in the world of Computer Science? 23 s 23 Lambda comes from the Lambda Calculus and refers to...
  • April 21, 2022
  • 0 Comments
Right, so I have an enumerable and wish to get distinct values from it. Using System.Linq, there’s, of course, an extension method called Distinct. In the simple case, it...
  • April 21, 2022
  • 0 Comments