Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6962083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:36:50+00:00 2026-05-27T15:36:50+00:00

I am thinking about code standards for a .net project (c sharp language) and

  • 0

I am thinking about code standards for a .net project (c sharp language) and I personally really like using lambda expressions in the various extension methods on IEnumerable etc (Where, GroupBy, blah, blah) and don’t really like the LINQ syntax.

I know it is a personal preference thing, so I am not asking which is best, but for me and my team we tend to find the lambda approach to be more easily readable. So I am thinking of saying in our coding standards to always use the Lambda approach but I got to thinking…

Is there anything that can only be achieved using LINQ syntax? By something I mean that you could build a particular expression tree using LINQ that you simply could not using the extension methods with lambda expressions. I am thinking that the answer is no as tools like resharper and linqpad are able to convert between them and I have been able to work out everything I have ever needed in lambda but I wonder if there is an edge case somewhere that the smart people on here know about?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:36:50+00:00Added an answer on May 27, 2026 at 3:36 pm

    “Possible” and “convenient” are different ;p Everything is possible; LINQ syntax ultimately compiles to lambda syntax, and there are things possible with extension syntax that aren’t possible in LINQ syntax (Distinct() in C#, for example, although it exists in VB.NET LINQ).

    However! When you have lots of variables in a LINQ query, that is a pain to map, as you would need lots of additional projections to intermediate objects (probably anonymous types); for example, try writing (in lambda syntax):

    var query = from x in xSource
                from y in x.SomeCollection
                from z in zSource
                let foo = x.Foo + z.SomeMethod()
                order by foo
                select new {x,y,z,foo};
    

    it is possible, but frankly a PITA.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm thinking about using Python as an embedded scripting language in a hobby project
Thinking about getting into .net technology project management I've had plenty of experience with
Thinking about avoiding code replication, I got a question that catches me every time
I was thinking about my code, and I accidentally clicked the Ln 74 at
I was thinking about a code that I wrote a few years ago in
We are thinking about obfuscating some code before releasing it to customers. We are
I am trying to setup a repository of reusable code. I was thinking about
I really like to study algorithms and optimize code (I try not to do
I was thinking about code structure, and thinking about setters. These used to be
I was thinking about system calls and code that we write! Lets say I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.