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

  • SEARCH
  • Home
  • 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 1051055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:52:10+00:00 2026-05-16T16:52:10+00:00

ILookup and IGrouping are pretty similar Linq interfaces. Both bound a key to a

  • 0

ILookup and IGrouping are pretty similar Linq interfaces.
Both bound a key to a list of values.

The question is what differs these both interface.

Does anyone have an example what you can do with one type that you are not able to todo with the other one?

When should you use “group by” and when “to lookup”?

  • 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-16T16:52:11+00:00Added an answer on May 16, 2026 at 4:52 pm

    You should call ToLookup if you need to lookup values by key, but you don’t need ordering.

    You should call GroupBy if you just need to loop through the groups.

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

Sidebar

Related Questions

.ToLookup<TSource, TKey> returns an ILookup<TKey, TSource> . ILookup<TKey, TSource> also implements interface IEnumerable<IGrouping<TKey, TSource>>
I've been having trouble articulating the differences between ILookup<TKey, TVal> and IGrouping<TKey, TVal> ,
Is there a quick way to get a flattened List<TElement> from an ILookup<TKey, TElement>
If one is designing an interface like ILookup (for simplicity, assume it's simply ICheckIfContained
I would like to filter a linq Lookup based on its values: the lookup:
I have this in my model, the content is the full list of country
I've got an ILookup generated by some complicated expression. Let's say it's a lookup
I have two variables of type ILookup. I wanted to use Union or Concat
Before .NET 3.5 was released, I use Dictionary<TKey, List<TValue>> for containing data. But I
Can an Interface contain an Enum? I am using asp.net 2.0. Suddenly my code

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.