Hello guys,
i have got a problem with this object (NSMutableSet)!
as what i have read over the objective-c's document, i read that this object contain unique elements ! so look at the code that i have written and tell me why does it add duplicate elements !!!
and
NSMutableSet *mutableSet =
i want to know why i can add duplicate elements since it must not be!
i need to add unique elements, kindly help me how i can do this.
thanks
i have got a problem with this object (NSMutableSet)!
as what i have read over the objective-c's document, i read that this object contain unique elements ! so look at the code that i have written and tell me why does it add duplicate elements !!!
Code:
NSMutableSet *mutableSet = [[NSMutableSet alloc]init];
[mutableSet addObject:@"value1"];
[mutableSet addObject:@"value1"];
[mutableSet addObject:@"value1"];
and
NSMutableSet *mutableSet =
Code:
[NSMutableSet setWithObjects:@"One", @"one", @"one", nil];
i want to know why i can add duplicate elements since it must not be!
i need to add unique elements, kindly help me how i can do this.
thanks