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 373595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:19:24+00:00 2026-05-12T14:19:24+00:00

Using a linq query/method chainging I wish to select just the first 2 Point

  • 0

Using a linq query/method chainging I wish to select just the first 2 Point objects in a List ordered by Point.X. How can I?

  • 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-12T14:19:25+00:00Added an answer on May 12, 2026 at 2:19 pm
    myList.OrderBy(item => item.X).Take(2);
    

    Breaking it down:

    OrderBy() takes a lambda expression which selects the key by which to order. In this case, we want to return the .X property on the object. Another example is if we had a Person object and wanted to sort by .FirstName, the key selector would be (item => item.FirstName).

    Take() truncates the enumeration to the specified number.

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

Sidebar

Related Questions

Can LINQ to SQL query using NOT IN ? e.g., SELECT au_lname, state FROM
I have a very simple table and I can happily query it using LINQ
I am using LINQ to query a generic dictionary and then use the result
I have a problem with the following Linq query using Entity Framework: from o
I have a DataGridView that I want to query using Linq (C# WinForm). I
Using LINQ to Entities sounds like a great way to query against a database
Using LINQ to SQL db.Products.Where(c => c.ID == 1).Skip(1).Take(1).ToList(); executes SELECT [t1].[ID], [t1].[CategoryID], [t1].[Name],
I have written a Linq to CRM query using CRM 2011 RC (v5) LINQ-to-CRM
using the following LINQ query: EntityQuery<Questions> query = context.GetQuestionsQuery() .Where(o => o.SurveyQuestions.Any(o2 => o2.SurveyID
My code for sql connection using linq is: var query1 = from u in

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.