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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:17:02+00:00 2026-06-15T19:17:02+00:00

Both methods return equal results. Of course, -[NSObject isEqual:] doesn’t compare the pointers of

  • 0

Both methods return equal results. Of course, -[NSObject isEqual:] doesn’t compare the pointers of objects, it somehow check the inner fields or whatever. So what’s the point of using exactly -[NSNumber isEqualToNumber:] to compare two NSNumbers?

  • 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-15T19:17:03+00:00Added an answer on June 15, 2026 at 7:17 pm

    From the docs:

    Two NSNumber objects are considered equal if they have the same id
    values or if they have equivalent values (as determined by the
    compare: method).
    This method is more efficient than compare: if you know the two
    objects are numbers.

    So it handles id equals and number comparison.

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

Sidebar

Related Questions

I have override GetHashCode and Equals and both methods provide same results for different
Are both the String comparison methods below considered to be equal public class TestString
Both methods MyBehavior::CreateSerializer() are not called of some reason, but ReplaceBehavior() method is working.
As the title goes, you can get the client's ip with both methods. I
ActiveRecord's has_many and belongs_to methods both take a :foreign_key option. If I need to
I have two ajax calls. Both are sync. Both call methods from one controller.
ActiveRecord::Base has a big ol' API with multiple methods for both finding and saving
lets say I have two methods in my controller to support both json and
I just want to know why both the paint and draw methods are used
Why do this Ruby object both a to_s and inspect methods that appear to

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.