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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:37:58+00:00 2026-05-11T13:37:58+00:00

I have a slightly odd problem that I think is most likely due to

  • 0

I have a slightly odd problem that I think is most likely due to an act of foolishness on my part, but for the life of me I (and other members of my team) can’t see it.

I have an object that contains a generic list property which I would like to sort. I have written a comparer class to do this for me and I am calling it in the following way:

baseObject.ListOfThings.Sort(new ThingComparer()) 

I have debugged into my compare function and it is returning the right values.

However After the sort call, the list remains unchanged. Have I missed something obvious, or is there something else I need to do.

Many thanks

EDIT: Yes I was being a fool, and the property returning a list was recreating it from scratch each time it was accessed. Thank you for your help everyone, and I will try to learn to check things better before asking for help in future

  • 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. 2026-05-11T13:37:59+00:00Added an answer on May 11, 2026 at 1:37 pm

    Is your base object recreating the list every time its accessed? Every time someone has asked me to help with this issue, that has turned out to be the problem. Maybe the property is calling a database, building the list when its accessed, etc…

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

Sidebar

Related Questions

This question has been asked before ( link ) but I have slightly different
I have to interface with a slightly archaic system that doesn't use webservices. In
Currently I have two MediaWikis, one a slightly older version than the other. I
I have a div tag which I populate dynamically. The problem is that in
This is a slightly odd problem, which means the solution is probably something trivial
My application seems to have acquired a slightly odd behaviour when it terminates. When
I have a program which needs to behave slightly differently on Tiger than on
I have a list of jar files, all containing slightly different versions of the
I'm having an odd issue with CALayer drawing for the iPhone. I have a
Updated: please see this other thread instead, all this COM stuff is not part

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.