iphone - Using NSArray with Monotouch -
How to insert items into NSAA objects in C # (monotoch)? I did not find the appropriate method to do this? In favor of Objective-C, there is a constructor named "initWithObjects", but I did not find it on the C # side. Sorry for answering your question with
pom
Instead of handling NSString and NSArray with runtime, instead of c # Strongly typed arrays are highlighted in the form of C and in the API.
In other words, unless you have a specific reason to mess with NSArray .
But, if you have any reason, or if this is your priority, then Jason's answer is correct:
NSArray someArray = NSArray.FromNSObjects (talk, one thing, two, talk three);
The only thing I am adding is that if you are an objective-deity and a Monochauc are trying, if you use it:
NSArray * someArray = [NSArray arrayWithObjects: obj1, obj2, obj3, nil];
Objective-C version is "zero" at the end. This is not the only requirement in Mono Touch's NSERE. You pass it only to the items you want, and it does so happily, no terminal faucet is needed :)
Hope That it helps ...
Comments
Post a Comment