Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

teguh123

macrumors member
Original poster
Mar 22, 2011
62
0
NSArray?

Is there a better class?

For example, in vb.net I have generic.list(of SomeClass), which I believe is better than just SomeClass(). However both are easily interchangeable due to linq .toList and .toArray function.
 
What do you mean by a "better" way?

In Objective-C, we use NSArray class to create arrays.
 
What are you trying to accomplish exactly ? Maybe if you grounded your question in something more tangible than comparing languages, we could help you with the NeXTSTEP/Cocoa Touch/Objective-C answer.

As it stands, NSArray or NSMutableArray are it for "lists of objects".
 
NSArray?

Is there a better class?

For example, in vb.net I have generic.list(of SomeClass), which I believe is better than just SomeClass(). However both are easily interchangeable due to linq .toList and .toArray function.

NSArray & NSMutableArray holds objects not data types so unlike VB its does not require multiple array types.

In VB you define a generic to hold multiple data types at one time otherwise a list would be restricted to only one type at a time ie: string, int, custom object.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.