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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:30:21+00:00 2026-05-22T18:30:21+00:00

good afternoon everybody the question is kinda simple but I’ve been having problems the

  • 0

good afternoon everybody

the question is kinda simple but I’ve been having problems the whole afternoon

i have 2 lists:

  • list of ints (ids)
  • list of objects (that contains ids)

and i want to compare them but i want to obtain the id that doesn’t have a pair (if it exists)

i was wondering if there’s a c# or linq method to identify the values that are different in two arrays

example

if i have

List<int> ids = {1,2,3,4,5}

and

List<objectX> x = (contains id,code, and description)

and i was trying something like

foreach (int id in ids)
        {
            foreach (objectX item in x)
            {
                if (item.id == id)
                {
                    break;
                }
                else
                    idDiferentes.Add(id);
            }
        }

but like you can imagine it doesn’t work

for example

ids= {1,2,3,4}
objectx[id] ={1,3,2}

the ids are different when i compare them so i get a bigger list that the one i need

i also tried with an linq outer join but i don’t understand how it works pretty well

  • 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-22T18:30:21+00:00Added an answer on May 22, 2026 at 6:30 pm
    var idsWithoutObjects = ids.Except(x.Select(item => item.id));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good Afternoon in my timezone. I have a simple question. I have an ArrayList
Good Afternoon, I am trying to use the composite filter but in vain. While
Good afternoon, I wish to have a script that will look for all files
Good afternoon, I have a listview filled using linqdatasource + entity framework iqueryable query.
Good afternoon, We are trying to build a prototype of Memory Mapped File Caching
Good afternoon, I've created a visual studio package that registers the Verilog language as
Good afternoon, I'd like to make some of my page content available to sort
Good afternoon in my timezone. I am working with JavaMail api with exJello Provider.
Good afternoon all, I've got an issue with a BizTalk orchestration that's really odd.
Good Afternoon, So I'm working with C++ (Visual Studios C++ 2010 to be exact)

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.