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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:47:39+00:00 2026-06-06T06:47:39+00:00

So far, reflection seems to be the only way to dynamically check if two

  • 0

So far, reflection seems to be the only way to dynamically check if two objects are the same. You would do this by iterating through the object’s members and checking for which ones contain a different value. However, research has told me that reflection is bad on performance when used this way.

If someone can confirm here whether or not reflection is indeed not a good choice for what I need to do, perhaps there is an alternative?

Note that, whatever route I go, I need the solution to be dynamic. This means no overriding of Equals and then comparing each property one by one. If it’s dynamic, I can write one method that will work for all types.

  • 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-06-06T06:47:42+00:00Added an answer on June 6, 2026 at 6:47 am

    Reflection is a good way to do it. So is writing your own object hashing method. If you write a hashing method that looks at all properties that need to be compared and makes a hash out of it, it should be a pretty fast comparision. You’ll probably need to use reflection for that as well. Sort of an override of object.GetHashCode() but do not take into account which reference is being looked at – just values.

    Try something – then decide whether performance is a problem afterwards.

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

Sidebar

Related Questions

So far I have only been updated a view from within its controller. I
As far as I can see this is not the case, however, I thought
As far as I know there is no way to migrate existing Facebook comments
As far as I know, Google Closure Template doesn't allow passing Java object into
I know you can dynamically create a .NET assembly using Emit, System.Reflection and manually
As far as I know, the best way to handle dynamic data in a
I am trying to hook Up a Delegate Using Reflection. This is what I
While using reflection is it possible to extract objects or variables no matter static
Far as best practices are concerned, which is better: public void SomeMethod(string str) {
As far as i remember while installing ubuntu,the installer didn't ask me for the

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.