MonobjcMonobjc Documented Class Library
NSArray Constructor (array, flag)
NamespacesMonobjc.FoundationNSArrayNSArray(NSArray, Boolean)

Initializes a newly allocated array using anArray as the source of data objects for the array.

Original signature is '- (id)initWithArray:(NSArray *)array copyItems:(BOOL)flag'

Available in Mac OS X v10.2 and later.

Declaration Syntax
C#Visual BasicVisual C++
public NSArray(
	NSArray array,
	bool flag
)
Public Sub New ( _
	array As NSArray, _
	flag As Boolean _
)
public:
NSArray(
	NSArray^ array, 
	bool flag
)
Parameters
array (NSArray)
An array containing the objects with which to initialize the new array.
flag (Boolean)
If YES, each object in array receives a copyWithZone: message to create a copy of the object—objects must conform to the NSCopying protocol. In a managed memory environment, this is instead of the retain message the object would otherwise receive. The object copy is then added to the returned array.
Return Value
An array initialized to contain the objects—or if flag is YES, copies of the objects—in array. The returned object might be different than the original receiver.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.Foundation (Module: Monobjc.Foundation)