Submit a Blog
Member - { Blog Details }

hero image

blog address: http://findnerd.com/list/view/Difference-between--and-isEqual-in-objective-c/2137/

keywords: Difference Between Equity Operators

member since: Jun 3, 2015 | Viewed: 10

Difference between "==" and "isEqual:" in objective C

Category: Technology

These two operators or function can be used to check equity of objects or operands. "==" is used to check if pointer values of objects are same. However "isEqual:" is used to test if both objects are having same values. So "==" works on reference and "isEqual" works on value. It can be easily understand by following example: NSMutableArray *array1 = [[NSMutableArray alloc]initWithObjects:@"A", @"B", nil]; NSMutableArray *array2 = [[NSMutableArray alloc]initWithObjects:@"A", @"B", nil]; if (array1 == array2) { NSLog(@"=="); } if ([array1 isEqual:array2]) { NSLog(@"isequal"); } For full blog kindly visit the link http://findnerd.com/list/view/Difference-between--and-isEqual-in-objective-c/2137/



{ More Related Blogs }
Cost-Benefit Analysis of DSpace-Based Document Management System (DMS)

Technology

TOP 10 Mobile Testing Techniques That Can Boost Your ROI

Technology

Why choose wireless remote control for overhead crane?

Technology

Sendwishonline

Technology

Sendwishonline...


Oct 24, 2021
Get In The Driver’s Seat: Learn All About Data-Driven Testing

Technology

iron press machine for clothes

Technology